mapbox / mapbox/vector-tile-spec

Allow altitude to be encoded

Open
#76 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
1k
Forks
213
PR merge metrics
No merged PRs in 30d

Description

Ultimately including 3D solids is what I would like however that is a complex issue that may confuse the specification or probably should be its own specification. See issues here: https://3d.bk.tudelft.nl/hledoux/blog/your-solids-the-same/

An intermediate step to provide 2.5D could be to allow 2 more commands and an altitude parameter

| Command | Id | Parameters | Parameter Count |
| --- | :-: | --- | --- |
| MoveTo | `1` | `dX`, `dY` | 2 |
| LineTo | `2` | `dX`, `dY` | 2 |
| MoveTo3 | `5` | `dX`, `dY`, `dAltitude` | 3 |
| LineTo3 | `6` | `dX`, `dY`, `dAltitude` | 3 |
| ClosePath | `7` | No parameters | 0 |
##### Example Command Integers

| Command | ID | Count | CommandInteger | Binary Representation `[Count][Id]` |
| --- | :-: | :-: | :-: | :-: |
| MoveTo | `1` | `1` | `9` | `[00000000 00000000 0000000 00001][001]` |
| MoveTo | `1` | `120` | `961` | `[00000000 00000000 0000011 11000][001]` |
| LineTo | `2` | `1` | `10` | `[00000000 00000000 0000000 00001][010]` |
| LineTo | `2` | `3` | `26` | `[00000000 00000000 0000000 00011][010]` |
| MoveTo3 | `5` | `1` | `13` | `[00000000 00000000 0000000 00001][101]` |
| MoveTo3 | `5` | `120` | `965` | `[00000000 00000000 0000011 11000][101]` |
| LineTo3 | `6` | `1` | `14` | `[00000000 00000000 0000000 00001][110]` |
| LineTo3 | `6` | `3` | `30` | `[00000000 00000000 0000000 00011][110]` |
| ClosePath | `7` | `1` | `15` | `[00000000 00000000 0000000 00001][111]` |

Calling it altitude hopefully conveys the intent to provide 2.5D for simplicity. The `MoveTo3` and `LineTo3` work the same as the corresponding `MoveTo` and `LineTo`.

This also maps to the TopoJson and GeoJson allowing an altitude to be defined in their coordinates specification.

The remaining problem is around specifying the bounds for the altitude and the extent. As the tiles won't stack. One option is to interpret the value using the tile resolution and the existing layer `extent` field. Values will be positive and negative.

Hopefully this will trigger some discussion :)

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

Start by reviewing the current vector tile specification and the linked discussion about 3D solids. Resolve the command semantics, altitude bounds, and interaction with tile resolution and the layer extent; done means the specification has an agreed, unambiguous 2.5D design.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.