Monday 30 May 2016

geojson - Create Vector Tiles for Polymaps


Ok, likely my bad for not making it to WhereCamp5280 and asking the FortiusOne geeks directly, but what's the process for creating GeoJSON 'tiles' for use in Polymaps?


The Population example over at polymaps.org notes that the data for the demo runs on Google AppEngine, and alludes to "rolling your own" vector tiles, but I can't seem to find any more information...


Anyone got some insight they can share?


Thanks!



Answer



TileStache will definitely do it, specifically the PostGeoJSON provider in the extra providers collection. The main difference between this and what we did for the Polymaps examples is polygon clipping - after seeing how large Alaska can get at higher zoom levels, we clipped all the features in the Polymaps examples to cut down on load times and so on. We also hosted them out of AppSpot to make it possible to add the Access-Control-Allow-Origin header for cross-domain permissions.


PostGeoJSON doesn't clip out of the box, but as it says in the docs I'd be happy to develop the code further if there's interest!



Update: It appears that as of Tilestache 1.9.0 the Vector Provider appears to be favored over the PostGeoJSON Provider.


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...