query-6a12bc71583d57131e74a8f6777e0a94

rq turtle/ttl

Map of ERA IDsMap of ERA IDs for one country taken from the ERA endpoint and plotted on a map

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
#defaultView:Map
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX era: <http://data.europa.eu/949/>
PREFIX geo2: <http://www.w3.org/2003/01/geo/wgs84_pos#>

SELECT DISTINCT ?opid ?label ?coord ?entity
WHERE {
  SERVICE <https://linked.ec-dataplatform.eu/sparql> {
    ?entity a era:OperationalPoint ;
      geo2:location ?geo ;
      era:opType <http://data.europa.eu/949/concepts/op-types/rinf/10> ;
      era:inCountry <http://publications.europa.eu/resource/authority/country/NOR> ;
      era:uopid ?opid ;
      rdfs:label ?label .
  }
  BIND(REPLACE(wikibase:decodeUri(STR(?geo)), "http://data.europa.eu/949/locations/(.*)/(.*)", "$1") AS ?long)
  BIND(REPLACE(wikibase:decodeUri(STR(?geo)), "http://data.europa.eu/949/locations/(.*)/(.*)", "$2") AS ?lat)
  BIND(STRDT(CONCAT("Point(", ?long, " ", ?lat, ")"), geo:wktLiteral) AS ?coord)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?coord"):::projected v1("?entity"):::projected v2("?geo") v4("?label"):::projected v6("?lat") v5("?long") v3("?opid"):::projected c6([http://data.europa.eu/949/concepts/op-types/rinf/10]):::iri c3([http://data.europa.eu/949/OperationalPoint]):::iri c8([http://publications.europa.eu/resource/authority/country/NOR]):::iri subgraph s1["https://linked.ec-dataplatform.eu/sparql"] style s1 stroke-width:4px; v1 --"a"--> c3 v1 --http://www.w3.org/2003/01/geo/wgs84_pos#location--> v2 v1 --http://data.europa.eu/949/opType--> c6 v1 --http://data.europa.eu/949/inCountry--> c8 v1 --http://data.europa.eu/949/uopid--> v3 v1 --"rdfs:label"--> v4 end bind0[/"replace(http://wikiba.se/ontology#decodeUri(str(?geo)),'http://data.europa.eu/949/locations/(.*)/(.*)','$1')"/] v2 --o bind0 bind0 --as--o v5 bind1[/"replace(http://wikiba.se/ontology#decodeUri(str(?geo)),'http://data.europa.eu/949/locations/(.*)/(.*)','$2')"/] v2 --o bind1 bind1 --as--o v6 bind2[/"STRDT(concat('Point(',?long,' ',?lat,')'),'geo:wktLiteral')"/] v5 --o bind2 v6 --o bind2 bind2 --as--o v7