Skip to content

Commit 2fbcafd

Browse files
committed
length => command count
1 parent d32bade commit 2fbcafd

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

‎2.1/README.md‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ This document specifies a space-efficient encoding format for tiled geographic v
1212

1313
The Vector Tile format uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) as a encoding format. Protocol Buffers are a language-neutral, platform-neutral extensible mechanism for serializing structured data.
1414

15-
## 2.1. File Extension
15+
### 2.1. File Extension
1616

1717
The filename extension for Vector Tile files SHOULD be `mvt`. For example, a file might be named `vector.mvt`.
1818

19-
## 2.2. Multipurpose Internet Mail Extensions (MIME)
19+
### 2.2. Multipurpose Internet Mail Extensions (MIME)
2020

2121
When serving Vector Tiles the MIME type SHOULD be `application/vnd.mapbox-vector-tile`.
2222

@@ -143,7 +143,7 @@ A `MoveTo` command with a command count of `n` MUST be immediately followed by `
143143
* Within POLYGON geometries, this coordinate defines the starting vertex of a new linear ring.
144144
2. Moves the cursor to `(pX, pY)`.
145145

146-
#### 4.3.3.2. LineTo Command
146+
##### 4.3.3.2. LineTo Command
147147

148148
A `LineTo` command with a command count of `n` MUST be immediately followed by `n` pairs of `ParameterInteger`s. Each pair `(dX, dY)`:
149149

@@ -154,7 +154,7 @@ A `LineTo` command with a command count of `n` MUST be immediately followed by `
154154

155155
For any pair of `(dX, dY)` the `dX` and `dY` MUST NOT both be `0`.
156156

157-
#### 4.3.3.3. ClosePath Command
157+
##### 4.3.3.3. ClosePath Command
158158

159159
A `ClosePath` command MUST have a command count of 1 and no parameters. The command closes the current linear ring of a POLYGON geometry via a line segment beginning at the cursor `(cX, cY)` and ending at the starting vertex of the current linear ring.
160160

@@ -230,7 +230,7 @@ Encoded as: [ 9 50 34 ]
230230
| | `> Decoded: ((34 >> 1) ^ (-(34 & 1))) = +17
231231
| `> Decoded: ((50 >> 1) ^ (-(50 & 1))) = +25
232232
| ===== relative MoveTo(+25, +17) == create point (25,17)
233-
`> [00001 001] = command id 1 (MoveTo), length 1
233+
`> [00001 001] = command id 1 (MoveTo), command count 1
234234
```
235235

236236
##### 4.3.5.2. Example Multi Point
@@ -253,7 +253,7 @@ Encoded as: [ 17 10 14 3 9 ]
253253
| | `> Decoded: ((34 >> 1) ^ (-(34 & 1))) = +7
254254
| `> Decoded: ((50 >> 1) ^ (-(50 & 1))) = +5
255255
| ===== relative MoveTo(+25, +17) == create point (25,17)
256-
`> [00010 001] = command id 1 (MoveTo), length 2
256+
`> [00010 001] = command id 1 (MoveTo), command count 2
257257
```
258258

259259
##### 4.3.5.3. Example Linestring
@@ -274,9 +274,9 @@ This would require three commands:
274274
Encoded as: [ 9 4 4 18 0 16 16 0 ]
275275
| | ==== relative LineTo(+8, +0) == Line to Point (10, 10)
276276
| | ==== relative LineTo(+0, +8) == Line to Point (2, 10)
277-
| `> [00010 010] = command id 2 (LineTo), length 2
277+
| `> [00010 010] = command id 2 (LineTo), command count 2
278278
| === relative MoveTo(+2, +2)
279-
`> [00001 001] = command id 1 (MoveTo), length 1
279+
`> [00001 001] = command id 1 (MoveTo), command count 1
280280
```
281281

282282
##### 4.3.5.4. Example Multi Linestring
@@ -302,14 +302,14 @@ This would require the following commands:
302302
```
303303
Encoded as: [ 9 4 4 18 0 16 16 0 9 17 17 10 4 8 ]
304304
| | | | === relative LineTo(+2, +4) == Line to Point (3,5)
305-
| | | `> [00001 010] = command id 2 (LineTo), length 1
305+
| | | `> [00001 010] = command id 2 (LineTo), command count 1
306306
| | | ===== relative MoveTo(-9, -9) == Start new line at (1,1)
307-
| | `> [00001 001] = command id 1 (MoveTo), length 1
307+
| | `> [00001 001] = command id 1 (MoveTo), command count 1
308308
| | ==== relative LineTo(+8, +0) == Line to Point (10, 10)
309309
| | ==== relative LineTo(+0, +8) == Line to Point (2, 10)
310-
| `> [00010 010] = command id 2 (LineTo), length 2
310+
| `> [00010 010] = command id 2 (LineTo), command count 2
311311
| === relative MoveTo(+2, +2)
312-
`> [00001 001] = command id 1 (MoveTo), length 1
312+
`> [00001 001] = command id 1 (MoveTo), command count 1
313313
```
314314

315315
##### 4.3.5.5. Example Polygon
@@ -330,12 +330,12 @@ Would encoded by using the following commands:
330330

331331
```
332332
Encoded as: [ 9 6 12 18 10 12 24 44 15 ]
333-
| | `> [00001 111] command id 7 (ClosePath), length 1
333+
| | `> [00001 111] command id 7 (ClosePath), command count 1
334334
| | ===== relative LineTo(+12, +22) == Line to Point (20, 34)
335335
| | ===== relative LineTo(+5, +6) == Line to Point (8, 12)
336-
| `> [00010 010] = command id 2 (LineTo), length 2
336+
| `> [00010 010] = command id 2 (LineTo), command count 2
337337
| ==== relative MoveTo(+3, +6)
338-
`> [00001 001] = command id 1 (MoveTo), length 1
338+
`> [00001 001] = command id 1 (MoveTo), command count 1
339339
```
340340

341341
##### 4.3.5.6. Example Multi Polygon

0 commit comments

Comments
 (0)