Spatial Maps#
About#
Map: A map represented by a static file or document
The schema.org type Map only offers one special property beyond the parent CreativeWork. That is a mapType which is an enumeration of types that do not apply to OIH use cases. However, the use of the Map typing itself may aid in narrowing search requests later to a specific creative work.
Schema.org type Map is a subtype of CreativeWork. As such, we can all the approaches described in the Documents section for this type as well. The use of type Map would be focused on documenting files such as KML, GeoJSON or others as a creative work that may be downloaded and used either in a workflow or directly.
A map in this context would be a static file or document of some sort. Map services like those described by an OGC Catalogue Service or other GIS service would be described as a service. Potential approaches for doing can be seen the service type.
Note
In the current context, schema.org Map typically references maps as a document. Here we are likely to reference a KML, Shapefile or GeoPackage. We may wish to then indicate the type of document it is through a mimetype via encoding.
1{
2 "@context": {
3 "@vocab": "https://schema.org/"
4 },
5 "@type": "Map",
6 "@id": "https://example.org/permanentUrlToThisJsonDoc",
7 "name": "Name or title of the document",
8 "description": "Description of the map to aid in searching",
9 "url": "https://www.sample-data-repository.org/creativework/map.pdf",
10 "identifier": {
11 "@id": "https://doi.org/10.5066/F7VX0DMQ",
12 "@type": "PropertyValue",
13 "propertyID": "https://registry.identifiers.org/registry/doi",
14 "value": "doi:10.5066/F7VX0DMQ",
15 "url": "https://doi.org/10.5066/F7VX0DMQ"
16 },
17 "keywords": [
18 {
19 "@id": "http://purl.org/dc/dcmitype/Image",
20 "@type": "DefinedTerm",
21 "inDefinedTermSet": "http://purl.org/dc/terms/DCMIType",
22 "termCode": "Image",
23 "name": "Image"
24 },
25 "Region X",
26 {
27 "@id": "https://www.wikidata.org/wiki/Q350134",
28 "@type": "URL",
29 "url": "https://www.wikidata.org/wiki/Q350134",
30 "name": "North Atlantic Ocean"
31 }
32 ]
33}
Tip
@id around line#6 should point to whatever resolves eventually to the JSON-LD - if you only
have an external JSON-LD file (and not embedded into the html <script>
tag)
then the @id should point to the .json file itself. Otherwise, @id should point
to the landing page of the record (HTML page), that embeds the JSON-LD.
Show code cell source
import json
from pyld import jsonld
import os, sys
currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils
with open("../../../odis-in/dataGraphs/thematics/docs/graphs/map.json") as dgraph:
doc = json.load(dgraph)
context = {
"@vocab": "https://schema.org/",
}
compacted = jsonld.compact(doc, context)
jbutils.show_graph(compacted)
Details: Identifier#
For each profile there are a few key elements we need to know about. One key element is what the authoritative reference or canonical identifier is for a resource.
Show code cell source
import json
from rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph
from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph
from pyld import jsonld
import graphviz
import os, sys
currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils
with open("../../../odis-in/dataGraphs/thematics/docs/graphs/map.json") as dgraph:
doc = json.load(dgraph)
frame = {
"@context": {"@vocab": "https://schema.org/"},
"@explicit": "true",
"@requireAll": "true",
"@type": "Map",
"identifier": ""
}
context = {
"@vocab": "https://schema.org/",
}
compacted = jsonld.compact(doc, context)
framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, indent=4)
print(jd)
jbutils.show_graph(framed)
{
"@context": {
"@vocab": "https://schema.org/"
},
"@id": "https://example.org/permanentUrlToThisJsonDoc",
"@type": "Map",
"identifier": {
"@id": "https://doi.org/10.5066/F7VX0DMQ",
"@type": "PropertyValue",
"propertyID": "https://registry.identifiers.org/registry/doi",
"url": "https://doi.org/10.5066/F7VX0DMQ",
"value": "doi:10.5066/F7VX0DMQ"
}
}
Keywords#
We can see three different approaches here to defining keywords.
Show code cell source
import json
from rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph
from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph
from pyld import jsonld
import graphviz
import os, sys
currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils
with open("../../../odis-in/dataGraphs/thematics/docs/graphs/map.json") as dgraph:
doc = json.load(dgraph)
frame = {
"@context": {"@vocab": "https://schema.org/"},
"@explicit": "true",
"@requireAll": "true",
"@type": "Map",
"keywords": ""
}
context = {
"@vocab": "https://schema.org/",
}
compacted = jsonld.compact(doc, context)
framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, indent=4)
print(jd)
jbutils.show_graph(framed)
{
"@context": {
"@vocab": "https://schema.org/"
},
"@id": "https://example.org/permanentUrlToThisJsonDoc",
"@type": "Map",
"keywords": [
{
"@id": "http://purl.org/dc/dcmitype/Image",
"@type": "DefinedTerm",
"inDefinedTermSet": "http://purl.org/dc/terms/DCMIType",
"name": "Image",
"termCode": "Image"
},
"Region X",
{
"@id": "https://www.wikidata.org/wiki/Q350134",
"@type": "URL",
"name": "North Atlantic Ocean",
"url": "https://www.wikidata.org/wiki/Q350134"
}
]
}
References#
For dataset we can use SOS Dataset
OBPS group is using JericoS3 API (ref: https://www.jerico-ri.eu/)
Traditional knowledge points here
sounds like they use dspace
For other document these are likely going to be some schema:CretiveWork with there being many subtypes we can explore. See also here Adam Leadbetter’s work at Ocean best practices
This is a great start and perhaps helps to highlight why SHACL shapes are useful
earthcubearchitecture-project418/p419dcatservices *EMODnet (Coner Delaney)
ERDAP also
Are we talking links from schema.org that link to OGC and ERDAP services
Are these methods?
Sounds like may link to external metadata for interop they have developed in the community
NOAA connected as well
Interested in OGC assets
ERDAP data platform