turf-tag: Allow specifying feature level attributes as fields
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
Description
turf-tag currently takes a field and outField which it expects to be an an attribute of the properties object.
In some cases however, the desired field may be a feature level attribute not part of the property object like id in this example:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": 12345,
"properties": {},
"geometry": {
...
}
}
]
}
Its currently not possible to target such attributes.
A way to specify the field refers to a feature level attribute will be very useful, especially while working with Mapbox vector tiles which commonly has feature level ids.
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 with the turf-tag implementation and documentation to understand how field and outField currently read from properties. Define how callers identify feature-level attributes such as id, then verify that property-based fields continue to work and that the documented example is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100