I'm displaying polygonal boundary data from a government source (VicGrid94 projection) on a Mapbox-GL-JS (EPSG 3857) map (first converting it to GeoJSON, EPSG 4326).

The client is concerned about the small distortions that happen in that conversion process: presumably although the vertices map precisely, the lines are different shapes in the different projections (so a given property might be slightly one side or the other, depending on the projection).

So I had the idea of:

  1. First, generate a new version of the boundaries, with many more vertices (linearly interpolated along the existing lines).
  2. Then reproject as above.

What tools can I use to do this?

I would naturally use Turf's lineChunk function but Turf doesn't seem to support other projections.


1 Answer 1


I recommend using ST_Segmentize in PostGIS as a pre-processing step. You just need to decide the length of shortest segment, and this function will return a geometry or geography having no segment that is longer than this. For (multi)polygons this results in densification.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.