Turfjs / Turfjs/turf

bbox-polygon support 6 position BBox

Open
#1,238 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

@turf/bbox-polygon
Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Description

bbox-polygon currently only support 4 position (2D) BBox values, although 6 position (3D) BBox values are obviously valid BBoxes.

It's trivial to support translating a 6 position BBox to a (2D) Polygon.
I've already produced an update to index.js and test.js in turf-bbox-polygon that supports both 4 and 6 position (2D & 3D) BBox values to 2D Polygons.

Optionally (pardon the pun) a member could be added to options as a flag to convert a 3D BBox to a 3D Polygon (I haven't done this).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect index.js and test.js in turf-bbox-polygon, starting with the existing 4-position BBox handling and its tests. Extend the behavior for 6-position BBoxes while preserving conversion to 2D Polygons, then update or add tests covering both coordinate lengths.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
computer-graphics
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.