Error occured while write polygon.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 321
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
I modify a function
function justCoords(t) {
if (t.geometry.coordinates[0] !== undefined &&
t.geometry.coordinates[0][0] !== undefined &&
t.geometry.coordinates[0][0][0] !== undefined) {
return t.geometry.coordinates[0];
} else {
return t.geometry.coordinates;
}
}
to
function justCoords(t) {
if (t.geometry.coordinates[0] !== undefined &&
t.geometry.coordinates[0][0] !== undefined &&
t.geometry.coordinates[0][0][0] !== undefined &&
t.geometry.coordinates[0][0][0][0] !== undefined ) {
return t.geometry.coordinates[0];
} else {
return t.geometry.coordinates;
}
}
Simple polygon have three [] in geometry, and multiple have four.
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
The issue identifies the justCoords function as the relevant entry point, but names no file or test. Reproduce writing both simple and multiple polygons, then inspect how their geometry coordinate nesting reaches justCoords; done means both polygon types write without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100