Sunday, 17 February 2019

animate polygons in series of kml/geojson/shp


I have a series of KML files (though they could easily be converted to geoJSON, SHP, or anything else that ogr2ogr can handle), each file containing a set of polygons that correspond to the alpha shape (concave hull) of my movements for that day. I'd like to animate the polygons so that I can see how my personal alpha shape changes over time. Is there a particularly straightforward way to do this? I've looked at what Google Earth can offer but I can't help but think there's an easier way.



Answer



I have done a similar thing using OpenLayers. My use case was actually points not polygons but the principle is the same. I stored the data in a PostGIS back-end and used a simple Python script to update the PostGIS store on a periodic basis (every 10 miliseconds in my case). I then used Geoserver to server the PostGIS layer as a WFS service. If you then use OpenLayers.Strategy.Refresh in your webpage to update your WFS layer, you can achieve nice animation of changing geographic features.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...