Library to generate heat map map overlay based off point values not point densities - google-maps

I have a set of data points where each point is expressed as a lat/lng. Each of these points has a value associated with it that changes over time. I would like to produce a heatmap animation overlay on top of a map that reflects this change in value over time. Note: I am fine with producing a series of static "snapshots" and piecing them together frame-by-frame into an animation, so the heatmap library itself does not have to support animation.
My first attempt was to use the HeatMapLayer which is a part of the Google Maps visualization library. However as per the question Heatmap based on average weights and not on the number of data points, it would seem that this particular visualization library insists on weighing the density of points in determining what color to use surrounding a given point.
I am after a solution that only considers the value of the points rather than the density. To give an example, assume one wanted to visualize the ambient temperature of a city over time, but there were more thermometers installed in some parts of the city than others. You wouldn't want a small area with many thermometers installed to show up red just because there were many thermometers - you'd want it to show up red only if it was hot there.
Basically, I want a single color for each of my points that reflects the intensity of the point's value, and then a gradient spatial transition between any two point's colors. It doesn't have to be Google Maps - the key criteria is just i) must base colors off point values not point densities ii) must overlay on top of a map and iii) ideally has a programming abstraction that talks in terms of lat/lng's, rather than requiring manual conversion to e.g. Euclidean space.

global tempsYou can do this with multiple:
gmaps.symbol_layer
and then just layer them up:
fig_gmap.add_layer(red_markers)
fig_gmap.add_layer(yellow_markers)
fig_gmap.add_layer(green_markers)
fig_gmap.add_layer(blue_markers)
I haven't been able to successfully pass a value that gives me a good temp color for the heat maps, just always get some variation on the density thing, which is a one trick pony. It would be nice having a way to do this and animate the marker icon without java.

Maybe you should try heatmap.js. It has a plugin for Google Maps: http://www.patrick-wied.at/static/heatmapjs/plugin-gmaps-layer.html
This library uses datasets made of coordinates and values. I think it will behave the way you described.

Related

Extracting data from shapefile for polygon

I am working on my masters thesis trying to determine habitat prefrences for wild turkeys. I have polygon shapefiles which represent areas that turkeys used during different breeding periods. These polygons are all circular and vary from 300m to 1500m radius.
I have data to be extracted in the form of polygon shapefiles that I need to extract for each of the above mentioned areas. For example, one of my habitat data shapefiles maps out areas that were burned. This is a polygon shapefile with 100% coverage. The shapefile has an attribute Y_N_U where Y= yes, N=no and U=unknown. For each of my used circles I need to extract how much area was burned, not burned, and is unknown (can be in actual meters squared or % of the area .
Thanks for the help.
I would use union tool and union all the layers together.
Use select by attribute to and delete the polygons except for your target area (habitat polys).
Use dissolve tool on the above layer and run it with the "Y_N_U" attribute and the FID field of the habitat poly selected.
Then create a new field such as "Area_sqmeter". Run calculate geometry on that field - choose square meter for the unit.
Use the select by attribute tool under the selection button on top.
After this select the area you want. Right click on layer's name in the table of contents. Go down to the "data" tab and when it expands, click on "extract data". Be sure to choose to extract what is selected and extract it to a new file geo database.
Then you can edit it from there at your heart's desire while the original is still there.

Maps API - Disable parts of the map

I am doing some research for what Map API to use for a coming project.
The main requirement is the ability to lock a map, and the ability to disable parts of the map.
Think about a special purpose map for Europe where I would like to disable and gray out the non-european countries.
A click on those grayed out areas should do nothing, meaning for all of the world except for Europe.
So, is it possible to disable large portions of the map?
Is it possible to add layers for the borders for each country, that is clickable, for instance on Germany?
I am looking at Bing or Google Maps at this point. Which one is more developer friendly one?
Bing looks so much nicer with the birds eye, much easier to read out the map and know what you are looking at. I find Googles full of clutter and always have problem knowing what I am looking at.
Possible approach(google-Maps): use a Polygon with multiple paths.
1 path for the entire world(vertices defined in clockwise order)
other paths for the enabled area(vertices defined in opposite clockwise order)
The result will be a polygon that covers the entire world with a hole for the enabled area. The map will not respond to click-events outside the enabled area(because it's covered by the polygon). The map will still respond to dblclick and zoom in, but this may be avoided by cancelling the propagation of the dblclick-event of the polygon.
It wouldn't be possible to gray out the dissabled area, but you could use the fillColor of the polygon to signalize which part of the map is disabled.

See streetview enabled streets without pegman

I don't want to use streetview, I just want to see what streets allow it and capture a graphic (so as to identify gated neighborhoods where the cars could not get in.) Of course one can drag out the pegman and do a screen capture (or several if one wants to stitch them together). One can use that method to (w/o the pegman) to capture maps (w/o highlighting s/v/e streets) HOWEVER there are much nicer ways to get an 8000 x 8000 pixel map (for example).
Question: Is there same way to leave the display of streetview enabled streets on without hovering the pegman?)
I once had this happen while I was using Gmaps(maybe due to where I dropped the man) but have never replicated it.

Horseshoe shaped polygon

I have the following kml polygon:
<Polygon><outerBoundaryIs><LinearRing><coordinates>20.002,80.002 20,80.002 20,80.004 20.006,80.004 20.006,80.001 20.002,80.001 20.002,80.002 20.004,80.002 20.004,80.003 20.002,80.003 </coordinates></LinearRing></outerBoundaryIs></Polygon>
If I view this polygon in a cell in my fusion table, in the Table View of Google Fusion Maps, it looks like this:
However, in the actual google map, in the Map View, it looks like this:
The duplicate point has been rather annoyingly dropped. I want what's shown in the first diagram above, but how should I change my polygon to get the same shape in google maps?
I also tried with an inner bound, but no luck there either:
<Polygon><outerBoundaryIs><LinearRing><coordinates>20.002,80.002 20,80.002 20,80.004 20.006,80.004 20.006,80.001 20.002,80.001 20.002,80.002 20.004,80.002 20.004,80.003 20.002,80.003 </coordinates></LinearRing></outerBoundaryIs></Polygon>
Thanks,
Barry
Self-intersecting polygons require quite a bit of extra power to draw correctly, so they are not widely supported in all 2d rendering APIs / implementations.
I suggest you work around the problem by splitting your polygon into two pieces.
Ok, I think I have the answer. I can add a tiny offset (jitter) to one of the two duplicate points in the polygon. However I must add the jitter in the correct direction otherwise the polygon becomes invalid and google no longer draws it. Looking at the previous points in the polygon loop, I should be able to establish in which direction I need to apply the jitter in.
<Polygon><outerBoundaryIs><LinearRing><coordinates>20.002,80.002 20,80.002 20,80.004 20.006,80.004 20.006,80.001 20.002,80.001 20.002000001,80.002 20.004,80.002 20.004,80.003 20.002,80.003 </coordinates></LinearRing></outerBoundaryIs></Polygon>

Simple map interface to create geo bounding boxes?

Hoping someone can point me to an existing resource so I don't have to create it myself.
Basically I need to get a series of lat/long coordinates that represent geo bounding boxes for Japan. The API the data is meant for allows multiple bounding boxes, so I want to create a series of smaller boxes that cover's about 99.9% of the country.
All I need to do is click on a map to indicate the north-east and south-west corners of a box, but I have been unable to find anything that quite does this.
The closest I found was this http://paulisageek.com/hacku/examples/geoBoundingBoxTabs.html. However it doesn't allow multiple bounding boxes, but more importantly doesn't provide the lat/longs that were calculated nor the ability to modify the boxes.
Doesnt look that hard with the new drawing tools library in the google maps api
http://code.google.com/apis/maps/documentation/javascript/overlays.html#drawing_tools
you get the coordinates, in callback event handlers.