paulmach / orb

Types and utilities for working with 2d geometry in Golang
MIT License
886 stars 103 forks source link

The resulting MVT is too big (27MB) #103

Closed SulimanLab closed 1 year ago

SulimanLab commented 2 years ago

Hi,

I have a large geojson file (500 MB) that i try to load in mapboxgl for performance reasons I needed to convert into vector tiles.

The issue is that it still return large mvt tiles size (around 27MB) which causes the mapbox to hang and gets laggy.

Is there a way to limit the number of features that is projected to a tile ?

paulmach commented 2 years ago

sure, filter them out.

But maybe your looking for something like https://github.com/mapbox/tippecanoe

SulimanLab commented 2 years ago

As far as I know tippecanoe works with static files, and there is no go/python API for it.

Can I achieve that without filtering them, lowering the resolution for example ? or limiting the resulting features ?

I have tested the same data with this project https://github.com/CrunchyData/pg_tileserv and the resulting tiles are significantly smaller (from 10MB to 500KB)