source: josm/trunk/src/org/openstreetmap/josm/data/imagery/vectortile/mapbox/Command.java@ 17862

Last change on this file since 17862 was 17862, checked in by simon04, 3 years ago

fix #17177 - Add support for Mapbox Vector Tile (patch by taylor.smock)

Signed-off-by: Taylor Smock <tsmock@…>

File size: 1.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.imagery.vectortile.mapbox;
3
4/**
5 * Command integers for Mapbox Vector Tiles
6 * @author Taylor Smock
7 * @since xxx
8 */
9public enum Command {
10 /**
11 * For {@link GeometryTypes#POINT}, each {@link #MoveTo} is a new point.
12 * For {@link GeometryTypes#LINESTRING} and {@link GeometryTypes#POLYGON}, each {@link #MoveTo} is a new geometry of the same type.
13 */
14 MoveTo((byte) 1, (byte) 2),
15 /**
16 * While not explicitly prohibited for {@link GeometryTypes#POINT}, it should be ignored.
17 * For {@link GeometryTypes#LINESTRING} and {@link GeometryTypes#POLYGON}, each {@link #LineTo} extends that geometry.
18 */
19 LineTo((byte) 2, (byte) 2),
20 /**
21 * This is only explicitly valid for {@link GeometryTypes#POLYGON}. It closes the {@link GeometryTypes#POLYGON}.
22 */
23 ClosePath((byte) 7, (byte) 0);
24
25 private final byte id;
26 private final byte parameters;
27
28 Command(byte id, byte parameters) {
29 this.id = id;
30 this.parameters = parameters;
31 }
32
33 /**
34 * Get the command id
35 * @return The id
36 */
37 public byte getId() {
38 return this.id;
39 }
40
41 /**
42 * Get the number of parameters
43 * @return The number of parameters
44 */
45 public byte getParameterNumber() {
46 return this.parameters;
47 }
48}
Note: See TracBrowser for help on using the repository browser.