Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transformScale with mutate: true creates wrong shape #2725

Open
amirnissim opened this issue Oct 1, 2024 · 0 comments
Open

transformScale with mutate: true creates wrong shape #2725

amirnissim opened this issue Oct 1, 2024 · 0 comments

Comments

@amirnissim
Copy link

reproduced with Turf version 7.1 running at https://turf-sandbox.netlify.app/ with the following code, results with wrong shape (screenshot attached)

const bbox = [34.785947387585615, 32.06427402333092, 34.8024054221005, 32.07576582361696];

const poly = turf.bboxPolygon(bbox);
const poly2 = turf.bboxPolygon(bbox);

const scaledPoly = turf.transformScale(poly, 1.7, {mutate: false})
const scaledPoly2Mutated = turf.transformScale(poly2, 1.7, {mutate: true})

return turf.featureCollection([poly , scaledPoly, scaledPoly2Mutated]);

possibly similar to #895 which was resolved.

4EZV7s2sM8kT2Eh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants