-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add validity field to fixtures and tests, update docs
- Loading branch information
Showing
16 changed files
with
114 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
id|description|reference | ||
id|description|valid v1|valid v2 | ||
---|---|--- | ||
001|A vector tile without any layers, which essentially results in a completely empty buffer. This is invalid according to both the v1 and v2 specifications.|[link](https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto#L75) | ||
002|A single layer with a single point feature that has no id field. According to the specification, "A feature MAY contain an id field. If a feature has an id field, the value of the id SHOULD be unique among the features of the parent layer."|[link](https://github.com/mapbox/vector-tile-spec/blob/master/2.1/README.md#42-features) | ||
001|A vector tile without any layers, which essentially results in a completely empty buffer. - [link](https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto#L75)|true|true | ||
002|A single layer with a single point feature that has no id field. According to the specification, "A feature MAY contain an id field. If a feature has an id field, the value of the id SHOULD be unique among the features of the parent layer." - [link](https://github.com/mapbox/vector-tile-spec/blob/master/2.1/README.md#42-features)|true|true | ||
003|A single point feature with a missing geometry type. From the spec, "A feature MUST contain a type field as described in the Geometry Types section." - [link](https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto#L41) - recommended error handling `recoverable`|false|false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"description": "A vector tile without any layers, which essentially results in a completely empty buffer. This is invalid according to both the v1 and v2 specifications.", | ||
"specification_reference": "https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto#L75" | ||
"description": "A vector tile without any layers, which essentially results in a completely empty buffer.", | ||
"specification_reference": "https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto#L75", | ||
"validity": { | ||
"v1": true, | ||
"v2": true | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
springmeyer
Contributor
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"description": "A single layer with a single point feature that has no id field. According to the specification, \"A feature MAY contain an id field. If a feature has an id field, the value of the id SHOULD be unique among the features of the parent layer.\"", | ||
"specification_reference": "https://github.com/mapbox/vector-tile-spec/blob/master/2.1/README.md#42-features" | ||
"specification_reference": "https://github.com/mapbox/vector-tile-spec/blob/master/2.1/README.md#42-features", | ||
"validity": { | ||
"v1": true, | ||
"v2": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"description": "A single point feature with a missing geometry type. From the spec, \"A feature MUST contain a type field as described in the Geometry Types section.\"", | ||
"specification_reference": "https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto#L41", | ||
"validity": { | ||
"v1": false, | ||
"v2": false, | ||
"error": "recoverable" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"layers": [ | ||
{ | ||
"version": 2, | ||
"name": "hello", | ||
"features": [ | ||
{ | ||
"id": 1, | ||
"tags": [], | ||
"geometry": [ | ||
9, | ||
50, | ||
34 | ||
] | ||
} | ||
], | ||
"keys": {}, | ||
"values": {}, | ||
"extent": 4096 | ||
} | ||
] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
module.exports = function(schema) { | ||
return { | ||
description: 'A vector tile without any layers, which essentially results in a completely empty buffer. This is invalid according to both the v1 and v2 specifications.', | ||
description: 'A vector tile without any layers, which essentially results in a completely empty buffer.', | ||
specification_reference: 'https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto#L75', | ||
validity: { | ||
v1: true, | ||
v2: true | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
springmeyer
Contributor
|
||
}, | ||
json: {} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module.exports = function(schema) { | ||
return { | ||
description: 'A single point feature with a missing geometry type. From the spec, "A feature MUST contain a type field as described in the Geometry Types section."', | ||
specification_reference: 'https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto#L41', | ||
validity: { | ||
v1: false, | ||
v2: false, | ||
error: 'recoverable' | ||
}, | ||
json: { | ||
layers: [ | ||
{ | ||
version: 2, | ||
name: 'hello', | ||
features: [ | ||
{ | ||
id: 1, | ||
tags: [], | ||
// type: schema.Tile.GeomType.POINT.value, | ||
geometry: [ 9, 50, 34 ] | ||
} | ||
], | ||
keys: {}, | ||
values: {}, | ||
extent: 4096 | ||
} | ||
] | ||
}, | ||
manipulate: function(buffer) { | ||
// stuff here | ||
return buffer; | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a mention that this field
error
is only present if the tiles are invalid according to one or more spec revisions?