Turfjs / turf

A modular geospatial engine written in JavaScript and TypeScript
https://turfjs.org/
MIT License
9.22k stars 935 forks source link

transformTranslate distorts the polygon shape #2419

Open just-ajs opened 1 year ago

just-ajs commented 1 year ago

Turf 6.5.0

TransformTranslate distorts the shape when translated across bigger distances, this is visible in this example, when used transformTransalte with parameters 2000, 66.

const leningrTranslated = transformTranslate(leningr.data, 2000, 66);

The original shape: image

And transformed shape: image

stebogit commented 1 year ago

@just-ajs though without seeing much details, from your little code I believe the issue could be due to mercator projection when you translate your polygon way up north. That is a known problem on web - i.e. flat - maps.

smallsaucepan commented 2 months ago

Hi @just-ajs. Do you still have the geojson used to generate the screenshots above? Would you mind attaching them to this issue so we can reproduce it?