OpenStreetMap (OSM) heatmap - openstreetmap

Has anyone used any of the following heat-map api/scritpts for OpenStreetMap:
Bjoern Hoehrmann's OpenLayers Heatmap Layer: http://www.websitedev.de/temp/openlayers-heatmap-layer.html
Heatmap by Patrick Wied: http://www.patrick-wied.at/static/heatmapjs/
I am looking for a free heatmap api that can be used in a production environment (a few thousand hits per day), so, if any one has used any of the above in a high visitor number environment, please share your experiences; otherwise please let me know if you are aware of any other free scripts for OSM heatmap.
Thanks!

Never used them, but you could try:
https://github.com/fredj/openlayers-heatmap
https://github.com/sunng87/heatcanvas

Related

Estimating Mapbox tile processing costs

We're using ogr2ogr and tippecanoe to generate MBTILES files and then uploading them to Mapbox. This incurs Mapbox's recent-ish tile processing and hosting costs.
We've been hit by a couple of surprise bills. We can work around this by following the advice on https://docs.mapbox.com/help/troubleshooting/manage-tileset-costs/#how-do-i-lower-my-tileset-processing-costs.
But there doesn't seem to be an obvious way to estimate tile processing costs before the upload occurs. I'd like to display the tileset's kilometers squared figure, resolution, and calculate a cost to show to our team before the upload occurs.
Does anyone know how this could be achieved?
Turns out Mapbox does have a tool for this, but it's not linked from any of their documentation.
See https://github.com/mapbox/tilesets-cli/#estimate-area
Example usage:
# tilesets estimate-area tennis.json -p 30cm
{"km2": "502912", "precision": "30cm", "pricing_docs": "For more information, visit https://www.mapbox.com/pricing/#tilesets"}

Translating GPS coordinates to map tile-like structure

I'm a complete illiterate when it comes to working with geographical data, so bear with me.
For our application we will be tracking a fairly large amount of rapidly changing points on a map. It would be nice to be able to cache the location of these points in some kind of map-tile structure so it would be easy to find all points currently in the same tile or neighbouring tiles, making it easier to quickly determine the nearest neigbours and have special logic for specific tiles, etc.
Although we're working for one specific (but already large) location, it would be nice if a solution would scale to other locations as well. Since we would only cache tiles that concern the system, would just tiling the enitre planet be the best option? The dimensions of a tile would then be measured in arc seconds/minutes, or is that a bad idea?
We already work with Postgres and this seems like something that could be done with PostGIS (is this what rasters are?), but jumping in to the documentation/tutorials without knowing what exactly I'm looking for is proving difficult. Any ideas?
PostGIS is all that you need. It can store your points in any coordinate reference system, but you'll probably be using longitude/latitude. Are your points coming from a GPS device?
PostGIS uses GIST indexing, making the search for points close to a given point quite efficient. One option you might want to look at, seeing that you are interested in tiling, is to "geohash" your points. Basically, this turns an (X,Y) coordinate pair into a single "string" with a length depending on the level of partitioning. Nearby points will have the same geohash value (= 1 tile) and are then easily identified with standard database search tools. See this answer and related question for some more considerations and an example in PostgreSQL.
You do not want to look at rasters. These are gridded data, think aerial photography or satellite images, weather maps, etc.
But if you want a more specific answer you should give some more details:
How many points? How are they collected?
Do you have large clusters?
Local? Regional? Global?
What other data does this relate to?
Pseudo table structure? Data layout?
etc
More info = better answer
Cheers, hope you get your face back

Calculate distance between two points in an OpenStreetMap file

I need to calculate the distance between two points in a map in the same way as Google Maps' distance matrix and get direction APIs.
Since I have to use offline more, I have to work with OpenStreetMap data.
I have downloaded the planet.osm file for the map data. How do I calculate the distance between two points with the OpenStreetMap file?
There are already several routing solutions for OpenStreetMap (OSM), including various web services, standalone programs, and libraries. You are probably interested in one of the many offline routers.

Get elevation of an area

I need to get the elevation in meters, of specific points within in a 1km square of ground.
Each point will be 5 meters apart, meaning a total of 40,000 specific points.
The elevation for each of these points will be stored in a 200x200 matrix.
I have tried to use the Google Maps Elevation API, but I think the amount of data I need to request will exceed the terms of service.
I also need to use the elevation data on Matlab, but reading the terms of service for the Google API, I believe I would be limited to using the data within Google Maps itself.
Please could you suggest a solution for me?
After reading all the Terms and Conditions for Google's elevation API, I believe you would be fine in using it for PERSONAL use in Metlab.
However, if you intend to publish the results or anything derived from the data, you will need to include a google map with it... but that could be in the form of a link to a map with just the 200x200 points plotted - a fifteen minute job to knock up ;)
Go for it :)

Google Earth Heat Maps

Is there a way to create a heat map in google earth, so areas with higher values (of some specified parameter, such as population) appear as hotspots?
This seems possible.
For instance, take a look at those few links :
Disclaimer : I've tried none of those
HeatMapAPI.com
And an example
But I'm not sure how you'd do it ; seems related to .NET and a dll in some way... so might not be as nice as it seems...
Density Mapping in Google Maps with HeatMapAPI
Heat Maps for Google Maps - (a.k.a GeoIQ mashup)
Using Google Maps to Produce Heat Maps
You've got a couple of links in those articles too ; some might be interesting too.
My colleague developed an open source java program that will generate 3D heat maps (KML) files for Google Earth from simply formatted XML data files. It may be of use. The entire project code is up at https://github.com/Noblis/OSAT You can ignore the bulk of what's there, and focus on GUIMain and the supporting files. There's sample files and documentation. I'd call it about a 0.5 version - it works, we used it in our studies, but there's some rough edges. It was done for transportation accessibility studies, but you can change the parameters you're graphing to anything you want, run from command line, whatever.
You can use the vertical axis to either view the same parameter as is used for the color OR use it to map an entirely different variable.
Here's two screen shots so you can see what it does:
tool interface:
example 3D output:
You can create polygons in a KML file and set the color of them. You can also make the polygons 3D, with height perhaps representing temperature.
There is also http://www.openheatmap.com, which offers free heatmaps on top of OpenStreetMap from a CSV upload.
Try free API heat maps. A really interesting implementation : http://en.tixik.com/tools/heatmaps
HeatmapTool.com can take a CSV file of coordinates and intensity values to generate heat map tiles for Google Maps.