json2geobuf doesn't encode altitude properly if a coordinate is missing altitude value
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
Given a MULTIPOINT set like:
```
{
"type": "MultiPoint",
"coordinates": [
[-112.021, 46.58, 1400],
[-112.045, 46.6],
[-112.0331, 46.5901, 1342]
]
}
```
The resulting set, after being converted to a PBF using json2geobuf and decoded with geobuf2json (or other decoders) shows the same (first occurring) altitude for all points in the set:
```
{
"type": "MultiPoint",
"coordinates": [
[-112.021, 46.58, 1400],
[-112.045, 46.6, 1400],
[-112.0331, 46.5901, 1400]
]
}
```
The issue does not occur if the point in the sample set is given an altitude of 0 or another value.
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 reported MULTIPOINT conversion through json2geobuf and geobuf2json using the coordinates shown in the issue. Trace how altitude values are encoded when one coordinate omits altitude, and verify that the missing altitude is not replaced by the first point's value.
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
- Mostly clear
- Newbie friendliness
- 35/100