Created
June 1, 2020 20:42
-
-
Save fils/5899894e5d5783f8da0f92043a97badd to your computer and use it in GitHub Desktop.
Represent 4 ways to represent spatial in JSON-LD
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
{ | |
"@context": { | |
"@version": 1.1, | |
"geoblob": { | |
"@id": "http://example.com/vocab/json", | |
"@type": "@json" | |
}, | |
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", | |
"rdfs": "http://www.w3.org/2000/01/rdf-schema#", | |
"xsd": "http://www.w3.org/2001/XMLSchema#", | |
"description": "http://igsn.org/core/v1/description", | |
"geosparql": "http://www.opengis.net/ont/geosparql#", | |
"schema": "https://schema.org/" | |
}, | |
"@id": "https://samples.earth/id/do/bqs2dn2u6s73o70jdup0", | |
"@type": "http://igsn.org/core/v1/Sample", | |
"description": "A fake ID for testing", | |
"schema:subjectOf": [ | |
{ | |
"schema:url": "https://samples.earth/id/do/bqs2dn2u6s73o70jdup0.geojson", | |
"@type": "schema:DigitalDocument", | |
"schema:format": [ | |
"application/vnd.geo+json" | |
], | |
"schema:conformsTo": "https://igsn.org/schema/spatial.schema.json" | |
} | |
], | |
"geosparql:hasGeometry": { | |
"@id": "_:N98e75cacc29f40deb555eb583cb162dc", | |
"@type": "http://www.opengis.net/ont/sf#Point", | |
"geosparql:asWKT": { | |
"@type": "http://www.opengis.net/ont/geosparql#wktLiteral", | |
"@value": "POINT(-76 -18)" | |
}, | |
"geosparql:crs": { | |
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84" | |
} | |
}, | |
"geoblob": { | |
"type": "GeometryCollection", | |
"geometries": [{ | |
"type": "Point", | |
"coordinates": [-76, -18] | |
}] | |
}, | |
"schema:spatialCoverage": { | |
"@type": "schema:Place", | |
"schema:geo": { | |
"@type": "schema:GeoCoordinates", | |
"schema:latitude": -18, | |
"schema:longitude": -76 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's s slight revision of the code. Adds a dcat:conformsTo link to a profile specification for conventions on how the "http://igsn.org/core/v1/Sample" type is actually implemented in this doc. Use rdfs label and description since they are more general than the schema.org entities. Uses schema:about to link to a JSON doc with sample location. Invent a local namespace 'igsn' for the sample description profile, and an igsn:sampleLocation property of core/sample, whose value is an array of different representations of the sample location. Note the example doesn't handle the vertical extent of the core sample. the Geoblob keys need a namespace don't they?