Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add entityId optional property #47

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions counterexamples/bad-entityId.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"id": "featureWithBadEntityId",
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0, 1]
},
"properties": {
"entityId": "1423"
}
}
2 changes: 2 additions & 0 deletions examples/admins/locality/admin-named-locality.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
id: capitolHillFeatureId
geometry:
coordinates:
- -122.3183680
- 47.6238307
type: Point
properties:
entityId: 08628d542fffffff0100000000052a6f
context: seattleId
localityType: neighborhood
names:
Expand Down
6 changes: 6 additions & 0 deletions schema/defs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ title: Overture Maps Feature Schema Common Definitions
description: Common schema definitions shared by all themes
"$defs":
propertyDefinitions:
entityId:
description: >-
Optional stable identifier for the feature. 128 bits represented as 32 hex characters.
type: string
pattern: ^[0-9a-f]{32}$
Comment on lines +10 to +11
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Advanced validation thought: we could probably figure out a way to assert in validation that id != entityId.

For later.

level:
description: Z-order of the feature where 0 is visual level
type: integer
Expand Down Expand Up @@ -241,6 +246,7 @@ description: Common schema definitions shared by all themes
^ext.*$:
description: "Additional top-level properties must be prefixed with `ext`."
properties:
entityId: { "$ref": "#/$defs/propertyDefinitions/entityId" }
theme: { "$ref": "#/$defs/propertyDefinitions/theme" }
type: { "$ref": "#/$defs/propertyDefinitions/featureType" }
version: { "$ref": "#/$defs/propertyDefinitions/featureVersion" }
Expand Down