mapbox / mapbox/vector-tile-spec

Splines Type

Open
#114 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We have a preliminary working set of vector tiles being created with a new data type that includes splines. The type of splines being used are b-splines. The control points of the spline are encoded in the same way a linestring would be encoded, with the knots being added to a new field of a repeated double in the Feature message.

Currently, the Spline is denoted by a GeomType
```
enum GeomType {
UNKNOWN = 0;
POINT = 1;
LINESTRING = 2;
POLYGON = 3;
SPLINE = 4;
}
```
and knots for the Feature message being added to field 5:
```
repeated double knots = 5 [ packed = true ];
```
An example implementation of this is located [here](https://github.com/mapbox/vector-tile-base/blob/master/vector_tile.proto).

## Pros

* This is a complete way to represent a curve
* Very precise curved structures
* Explicit type (compared to using a CurveTo command with existing types)
* Could be interpolated into linestring in decoders if necessary

## Cons

* Splines are complex and could be difficult for some people to utilize properly
* Does not provide a clear curve for polygon types
* Increased complexity of types

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 example implementation in vector_tile.proto. Read the seven comments to understand the unresolved tradeoffs around SPLINE, b-spline control points, and the knots field. Done means the proposal has a documented decision and, if accepted, the specification reflects the agreed representation.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.