0

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.

  • 2
    I've always called inserting vertices in straight lines to avoid undue distortions as 'densification'. How to do it depends on your software; you're doing this once only right? It isn't something you want to do on-the-fly.. gis.stackexchange.com/questions/34406/… might help. – Michael Stimson Feb 13 '18 at 0:14
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, privacy policy and cookie policy

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