mapbox/geojson-vt

Is it possible to pass false to simplification for points?

reyemtm opened this issue · 3 comments

Issue -

I am trying to understand how the simplification/projection works for points, specifically if and why points are simplified, and finally if there is a way I can avoid simplification of points - or really the manipulation of the point geometry - at lower zoom levels altogether?

Reason -

I want to query a tile at zoom level 8 or 9, and have the geometry be the same if possible of the original geojson data. My issue is I cannot figure out if this is due to projecting the point to the tile coordinates or simplification.

Individual points are not simplified at all in geojson-vt. See #8.

The difference can only be due to rounding to tile coordinates. But you could try increasing the tile coord precision by increasing the extent in options (it's 4096 by default).

Thanks, looks like this is the key section -

feature.geometry.push(transformPoint(geom[j], geom[j + 1], extent, z2, tx, ty));

So based on the tile extent and zoom level, there is a certain level of error to the raw data if the tile coordinates are decoded back to decimal degrees. Are you aware of any documentation on this level of error per extent and zoom level, or is this something that can fairly easily be determined?

Related stackoverflow question