Google Earth Heat Maps - google-earth

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.

Related

Multiple extruded polygons Mapbox iOS

Latest Mapbox SDK and Swift
So I've been battling with this for 3 days now...
I'm trying to use an array of coordinates to create a line of extruded cylindrical pillars (or a sloped solid "wall" if that makes sense... But I've found this to be harder than just a line of pillars)
I've read most of Mapbox's docs but can't get my head wrapped around the use of MGLShapeSource, MGLPolygon and MGLFillExtrusionStyleLayer.
From what I can tell, one needs to add a polygon to a source, add that source to the map object, then apply the extrusion layer to that source... However, I can't figure out how to make that work.
This is what I've managed so far, as a solid wall... But using pillars, I could adjust the height as the line goes, creating a sloping look
Any advice would be appreciated. I'd paste my code here but it is WAY too messy and too much after 3 days of trial and error. haha.
BONUS: I'd like to animate the path being created as it goes... So pillar 1 appears at a certain height, then pillar two and a lower height, then pillar 3 and so on. This involves modifying the source apparently - have little idea on how to do that though :(
Are there individual height properties associated with the points in your underlying data? Your end goal is definitely possible, but it's dependent on whether or not you have the data for reference by your style layer.
Unfortunately, the Mapbox site doesn't have any iOS examples explicitly tied to this. But, the 3D buildings example follows basically the same flow. (i.e. mapView.addSource -> MGLFillExtrusionStyleLayer -> layer.fillExtrusionHeight).
The crucial bit in the building example is using .fillExtrusionHeight with a "forKeyPath" expression to set the extrusion height based on the corresponding property in your data:
layer.fillExtrusionHeight = NSExpression(forKeyPath: "height")
If you don't have height within your underlying data, you'll have to get some in order for the extrusion styling to work this way.
⚠️ Disclaimer: I currently work for Mapbox ⚠️

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

Converting images from one geospatial coordinate system to another

I'd like to stack the images from this map: http://earthquake.usgs.gov/regional/nca/soiltype/map/ from linear projection into a leaflet map. The source tiles are in known but nonstandard zoom levels, and leaflet maps want mercator mercator XYZ tiles. In principle, I know how to do this - I have functions for changing XY coordinates into lat-lng coordinates in the two maps, and I just need to map pixels for the target map in terms of pixels in the source map.
This is unfortunately nontrivial, as the source pixels are spread across hundreds of different image files, and I am trying to put them into hundreds more images. Is there a software package that makes this a little bit more straightforward? If there is no library for dealing with this kind of data, it seems like there really should be...
Postgis has the RT_ST_Transform method, which under the hood uses GdalWarp. So, you have at least these two options. If you use Postgis, you will need to actually register/import the images into Postgis, using raster2pgsql and then call RT_ST_Transform on each one and then dump them out again -- which could be scripted to some extent using plpgsql (Postgres's scripting language). There is something of a learning curve involved with using Postgis raster, which may be worthwhile if you plan to do any other image processing analysis. You could also write a shell script (or similar) to automate gdalwarp if you don't wish to go the Postgis route.
For a less formal method than gdalwarp (an excellent program), you can check out the Leaflet plugin Leaflet.imageTransform, that can transform and image on the fly in the browser.

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 :)

Is it possible to random generate tmx (map) files in Objective-C?

Basically, I'm making an iPhone RPG as a little project for myself, I'm using Cocos2d and thus 2D tiled maps. I had planned to do randomly generate the levels for the map, but have realised it may be harder than I think to randomly generate them and keep collidable tiles working.
Is this possible to do, and has anyone done it?
I'm not familiar with tmx file format you are asking about but usually the way you go about generating a map is to start with the physics of the map not the visual representation. Here is two way to do it
(1) Define materials (water, sand, rock)
(2) Define how much of each you want to use in the map (as percentage)
(3) Place material seeds in your map
(4) Grow the seeds by expanding the material in all directions until the space is full
(5) Now define relation between visual tile and material. If it's transition from one material to another or 100% of one material.
(6) Generate your visual representation using material map and relation between materials and art.
...
(3) Fill your map with the materials you defined using the appropriate amount you defined.
(4) Use clustarization algorithm to swap tiles and form islands. (increasing the number of steps of your clustarization algorithm will make fewer but larger islands)
...
(0) There may be some other rules that the map needs to follow like accesability from one area to another. You can start by placing that in your physics map first and not allowing the other algorithms to break it.
Good luck!
Random map generation is possible and is used in many games. Diablo is one of the first games that come to my mind. Don't forget to set proper boundaries for the generation algorithm, however, because it might create a map with impassable locations.