transformScale with `mutate: true` creates wrong shape
Open
Nobody has claimed this yet.
@turf/transform-scale
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
Description
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 https://github.com/Turfjs/turf/issues/895 which was resolved.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided bboxPolygon and transformScale example in the Turf sandbox, then inspect the transformScale entry point and the behavior described in issue #895. Done means the mutate: true and mutate: false results have the same correct shape for this reproduction, with regression coverage added in the project’s existing test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100