Question

I have a map with a lot of points (60k). They're spread across 21 separate layers. (It's a demographic scatterplot map.)

I'm exporting to mbtiles with a zoom range of 11-15. The geographic area is around 700 square miles.

I'm only exporting the points, not any underlying basemap. Supposedly, this should only generate a 1-10mb file. But I'm getting a half-hour wait to bake the tiles.

Is that unusual?

Was it helpful?

Solution

30 minute TileMill exports can be on the fast side depending on the size/type of project, but in your case there's probably ways to optimize this much further.

The most important factor is to make sure your data is properly indexed:

  • For Shapefiles, use the shapeindex command-line utility. (On Ubuntu this is provided by the mapnik-utils package. I'm not sure about other platforms but it may be included with TileMill already.)
  • For PostGIS tables, make sure there is an index on the geometry column with the USING gist option.
  • SQLite files will be automatically indexed by TileMill.
  • GeoJSON files cannot be indexed and should be converted to another format for best performance.

Having everything already projected to Web Mercator (EPSG:3857) is a good idea too. TileMill is also reasonably well-optimized for EPSG:4326.

Finally you may want to tweak your buffer and metatile settings, however for a smaller project like this it may not make much difference. If you are only exporting points (without labels) your buffer only needs to be as wide as your largest marker-width (the default buffer-size is 128 pixels). See this guide for more information about when and how to adjust buffers and metatiles.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top