Endpoint: sparql Image Matters Semantic Portrayal Service
88
Copyright © 2015 Open Geospatial Consortium.
http:ows.usersmarts.comportrayalapisparql?query=your encoded sparql query Here some sample queries that could be sent to the server:
The following query describes the list of SymbolSets available in the knowledge base PREFIX symbol:http:www.opengis.netontportrayalsymbol
DESCRIBE ?symbolSet WHERE { ?symbolSet a symbol:SymbolSet.
}
The following query lists the symbols from EMS with label and notation PREFIX symbol:http:www.opengis.netontportrayalsymbol
PREFIX dct: http:purl.orgdcterms PREFIX rdfs: http:www.w3.org200001rdf-schema
PREFIX skos: http:www.w3.org200402skoscore SELECT ?symbol ?label ?notation WHERE {
?symbol a symbol:Symbol; rdfs:label ?label;
skos:notation ?notation; symbol:symbolSet
http:www.opengis.nettestbed11cciemssymbolsEMSSymbolSet. }
Figure 13 SPARQL Client response shows the response in the SPARQL client.
Copyright © 2015 Open Geospatial Consortium.
89
Figure 13 SPARQL Client response
Describe the styles available in the knowledge base PREFIX style:http:www.opengis.netontportrayalstyle
DESCRIBE ?style { ?style a style:Style.
} The following response in TTL is returned
prefix rdfs: http:www.w3.org200001rdf-schema . prefix style: http:www.opengis.netontportrayalstyle .
prefix symbol: http:www.opengis.netontportrayalsymbol . prefix dct: http:purl.orgdcterms .
prefix skos: http:www.w3.org200402skoscore . http:www.opengis.nettestbed11cciemsstyleEMSStyle
a style:Style ;
90
Copyright © 2015 Open Geospatial Consortium.
dct:audience http:ows.usersmarts.comldappaudiencescommunityCanadianEmergencyAndDisast
erManagement ; dct:description Style defining the set of rules for mapping incident types from
EMS to symbology ; dct:title EMS Style ;
style:hasRuleSet http:www.opengis.nettestbed11cciemsstyleEMSRuleSet ; style:symbolSet
http:www.opengis.nettestbed11cciemssymbolsEMSSymbolSet . http:www.opengis.nettestbed11ccihswgstyleHSWGStyle
a style:Style ; dct:audience
http:ows.usersmarts.comldappaudiencescommunityHSGWEmergencyAndDisaster Management ;
dct:description Style defining the set of rules for mapping incident types from HSWG to symbology ;
dct:title HSWG Style ; style:hasRuleSet
http:www.opengis.nettestbed11ccihswgstyleHSWGRuleSet ; style:symbolSet
http:www.opengis.nettestbed11ccihswgsymbolsHSWGSymbolSet .
Select rules from EMS Style that portrays EMSIncident PREFIX style:http:www.opengis.netontportrayalstyle
PREFIX incident:http:www.opengis.netontemergencyincident SELECT ?rule {
http:www.opengis.nettestbed11cciemsstyleEMSRuleSet style:hasRule ?rule. ?rule a style:PortrayalRule.
?rule style:featureType http:www.opengis.nettestbed11ontincidentemsEMSIncident
}
The following SPARQL results in JSON is returned {
head: { vars: [ rule ]
} , results: {
bindings: [
Copyright © 2015 Open Geospatial Consortium.
91 {
rule: { type: uri , value: http:www.opengis.nettestbed11cciemsstyleems.incident.meteorological.waterspou
t-portrayal-rule } } ,
{ rule: { type: uri , value:
http:www.opengis.nettestbed11cciemsstyleems.incident.meteorological.winterStor m-portrayal-rule }
} , {
rule: { type: uri , value: http:www.opengis.nettestbed11cciemsstyleems.incident.missingperson-portrayal-
rule } } ,
…. truncated ]
} }