Question

I am new to mapbox and I met a problem and I really want help.

I am creating a population density map of a city. There are 53000+ polygon for this city and I use ArcGis to generate the random points in every polygon which creates 4 millions points totally....and the geojson file is over 600MB, I want to make MBTile from TileMill of mapbox.

I tried to generate the 1/20 points layer which is 200,000 points which can be added to the TileMill. But that is not what I want.

And I tried to add 4 millions points layer to TileMill, it will crash...

How should I reduce the size of the 4 millions points?

Or is there any better way to handle this kind of "millions points" situation?

I will be really appreciated for any suggestions from experienced developers in millions of population density. Thank you very much.

Was it helpful?

Solution 2

And I tried to add 4 millions points layer to TileMill, it will crash

TileMill is designed for this, and will not crash if your data is properly indexed and formatted. The reason why this isn't working usually boils down to "your data isn't indexed". If you want to use a shapefile, use shapeindex to index it: otherwise import your data into PostGIS and make sure the table as a correct index.

OTHER TIPS

Kind of late answer, but if you need to deal with vector points at that scale then you might want to consider using Mapbox protocol buffers ~ mapbox-gl.

Workflow:

  1. get mapbox studio and create a project.
  2. upload your data into a new project and upload it to the cloud (mapbox) or host on your own
  3. implement a mapbox-gl-js project and bring in your layer of 4 million vector points
  4. drink a cold beer

*** Please note that Mapbox-gl is using Web-gl which is really bleeding edge stuff, if you need to support older browsers then go with tmcw's answer.

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