I am building an application that will need to use a mapping service to locate a set of addresses, and include said map with its reporting features. Meaning that it would be beneficial if there was an easy way to convert the map into something printable.
I haven't started designing the application yet, but I will probably write it in Python. I am aware of Google static maps, and it looks promising, especially the method of assigning waypoints (it is exactly what I need), but the map is limited to 640x640, so I was wondering if there are other options that would work well.
Thank you for your input.
You could try and create your own 640x640 tiles, then do some post-cleaning up before stitching them together. Or, generate a kml file of the addresses and use another mapping service?
I know this post is a bit old, but the MapQuest Static Maps Web Service might be worth a look for anyone else who has a similar need. The maximum dimensions of a static map request are 2048X2048, so a bit bigger than 640X640. If you have any questions, check out the forums on the MapQuest Developer Network.
Related
I want to get the route between 2 points using google maps api but I want also avoid some coordinates between them.
I have been investigating this feature but I do not know if it is possible to get this done. See these threads:
Is there a way to avoid a specific road or coordinate in Google Directions?
Avoid some coordinates in routes using Google Directions API Android
Anyone know if it is possible?
Thanks
Avoid feature has been introduced in Google Maps Distance Matrix API, however it can only be used to avoid Tolls, Highways, Ferries, and Indoor.
you can check this on its documentation page.
https://developers.google.com/maps/documentation/distance-matrix/intro
This feature is pretty popular and has been formerly requested in Google Issue Tracker. If you really need it you can go ahead and support it by starring it.
https://issuetracker.google.com/issues/35816642
I am sorry if the question is confusing or doesn't make sense, this is my first project and I'll try to explain it to the best of my capabilities.
At first, I thought I would just be hosting a single map that I created using folium and inherited the template of the map into the website which is created with flask, therefore I didn't do any hardcoding in the main app.py file, however, it seemed really basic. So now using machine learning algorithms, I want to display different things over the map which makes some predictions for every hour of the day.
THE PROBLEM: It will take longer than expected to generate a new map every hour of the day (plus storing a new map so many times will be expensive in terms of storage).
MY SOLUTION: Have a skeleton map because the area that I will be making predictions on is localized, so have that area as the basic map and change the upper layers that will have the predictions displayed (basically heat map) every hour.
Is this a correct approach? Please recommend a right path to implement this. I am open to trying new things as long as it gets the job done. Would really appreciate any help regarding this. Thanks in advance
Folium does not support WebSockets if anything add new javascript to fetch data dynamically, but the best way would be to fetch data instead of rendering html everytime, it would help with the speed issue as well. Also, look into leaflets that would help too.
If you want to generate your map faster, you can use directly the Javascript library Leaflet to create the map (it is the library that is used to render the map with Folium). You need to send the data of your predictions from your backend in Flask to your front-end in Javascript with Leaflet in your HTML template (Jinja2).
I am thinking of creating a web application that shows a map of a city (from openstreetmaps data). I would like to create a layer on top which represents markers. I foresee that I will have a database of numerous markers, which will be shown on the map as layer. I have come across openstreetmap, openlayers, geodjango etc but am unable to figure out how to make all these fit together to solve my issue. I am comfortable using Django and Python. Can someone help me understand the following:
How to host OSM data on my own server using Django and acting as a Mapserver (or map source) for openlayers?
How to ask openlayer to talk to this server to render the map or overlays?
I'm sorry if some part of my question does not make sense; it is because my understanding how these components is quite hazy at the moment.
Displaying markers at coordinates is the easy part. The harder part is hosting your own base map. Here is one way I think you could do it:
Obtain the OpenStreetMap data for the area you are interested in.
Develop a stylesheet for your map, or use an existing one. Mapnik is an option.
Use Tilecache to serve cached image tiles of the map at various scale levels. This would have to run in addition to your django app.
Another option would be to use Tiledrawer to set up an Amazon EC2 server serving your base map without having to manually configure everything.
Stack Overflow is only letting me post two links, so you will have to search for the websites of Tilecache and Mapnik, but they are easy to find.
References:
https://gis.stackexchange.com/questions/10162/how-to-set-up-an-osm-server-with-tilecache-and-mapnik
I'm wondering how the best way to build a way to interface with Yahoo Chat is. I haven't found anything that looks incredibly easy to do yet. One thought it to build it all from scratch, the other thought would be to grab the code from open source software. I could use something like zinc, however, this maybe more complex than it needs to be. Another option would be to find a library that supports it, however, I haven't seen one. What are your thoughts on how to proceed and what would be the best way? I'm not necessarily looking for the fastest way as this is a bit of a learning project for me.
Python-purple is a python API for accessing libpurple, the Pidgin backend. It will give you access to all the IM networks which Pidgin supports, including Y!Messenger, MSN Messenger, Jabber/GTalk/XMPP, and more...
We have lots of data and some charts repesenting one logical item. Charts and data is stored in various files. As a result, most users can easily access and re-use the information in their applications.
However, this not exactly a good way of storing data. Amongst other reasons, charts belong to some data, the charts and data have some meta-information that is not reflected in the file system, there are a lot of files, etc.
Ideally, we want
one big "file" that can store all
information (text, data and charts)
the "file" is human readable,
portable and accessible by
non-technical users
allows typical office applications
like MS Word or MS Excel to extract
text, data and charts easily.
light-weight, easy solution. Quick
and dirty is sufficient. Not many
users.
I am happy to use some scripting language like Python to generate the "file", third-party tools (ideally free as in beer), and everything that you find on a typical Windows-centric office computer.
Some ideas that we currently ponder:
using VB or pywin32 to script MS Word or Excel
creating html and publish it on a RESTful web server
Could you expand on the ideas above? Do you have any other ideas? What should we consider?
I can only agree with Reef on the general concepts he presented:
You will almost certainly prefer the data in a database than in a single large file
You should not worry that the data is not directly manipulated by users because as Reef mentioned, it can only go wrong. And you would be suprised at how ugly it can get
Concerning the usage of MS Office integration tools I disagree with Reef. You can quite easily create an ActiveX Server (in Python if you like) that is accessible from the MS Office suite. As long as you have a solid infrastructure that allows some sort of file share, you could use that shared area to keep your code. I guess the mess Reef was talking about mostly is about keeping users' versions of your extract/import code in sync. If you do not use some sort of shared repository (a simple shared folder) or if your infrastructure fails you often so that the shared folder becomes unavailable you will be in great pain. Note what is also somewhat painful if you do not have the appropriate tools but deal with many users: The ActiveX Server is best registered on each machine.
So.. I just said MS Office integration is very doable. But whether it is the best thing to do is a different matter. I strongly believe you will serve your users better if you build a web-site that handles their data for them. This sort of tool however almost certainly becomes an "ongoing project". Often, even as an "ongoing project", the time saved by your users could still make it worth it. But sometimes, strategically, you want to give your users a poorer experience to control project costs. In that case the ActiveX Server I mentioned could be what you want.
Instead of using one big file, You should use a database. Yes, You can store various types of files like gifs in the database if You like to.
The file would not be human readable or accessible by non-technical users, but this is good.
The database would have a website that Your non-technical users would use to insert, update and get data from. They would be able to display it on the page or export it to csv (or even xls - it's not that hard, I've seen some csv->xls converters). You could look into some open standard document formats, I think it should be quite easy to output data with in it. Do not try to output in "doc" format (but You could try "docx"). You should be able to easily teach the users how to export their data to a CSV and upload it to the site, or they could use the web interface to insert the data if they like to.
If You will allow Your users to mess with the raw data, they will break it (i have tried that, You have no idea how those guys could do that). The only way to prevent it is to make a web form that only allows them to perform certain actions that You exactly know how that they should suppose to perform.
The database + web page solution is the good one. Using VB or pywin32 to script MSOffice will get You in so much trouble I cannot even imagine.
You could use gnuplot or some other graphics library to draw (pretty straightforward to implement, it does all the hard work for You).
I am afraid that the "quick" and dirty solution is tempting, but I only can say one thing: it will not be quick. In a few weeks You will find that hacking around with MSOffice scripting is messy, buggy and unreliable and the non-technical guys will hate it and say that in other companies they used to have a simple web panel that did that. Then You will find that You will not be able to ask about the scripting because everyone uses the web interfaces nowadays, as they are quite easy to implement and maintain.
This is not a small project, it's a medium sized one, You need to remember this while writing it. It will take some time to do it and test it and You will have to add new features as the non-technical guys will start using it. I knew some passionate php teenagers who would be able to write this panel in a week, but as I understand You have some better resources so I hope You will come with a really reliable, modular, extensible solution with good usability and happy users.
Good luck!