Skip to content

Instantly share code, notes, and snippets.

@atlefren
Created November 27, 2015 09:23
Show Gist options
  • Save atlefren/a8b0ec68453a78644c00 to your computer and use it in GitHub Desktop.
Save atlefren/a8b0ec68453a78644c00 to your computer and use it in GitHub Desktop.
select ?id ?name ?description ?loccatlabel (SAMPLE(?point) as ?point) ?img ?thumbnail ?url as ?link {
?id a ?type .
?id rdfs:label ?name .
?id <https://data.kulturminne.no/askeladden/schema/i-kommune> ?kommune .
?id <https://data.kulturminne.no/askeladden/schema/beskrivelse> ?description .
?id <https://data.kulturminne.no/askeladden/schema/lokalitetskategori> ?lokalitetskategori .
?lokalitetskategori rdfs:label ?loccatlabel .
BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid)
BIND(bif:concat("http://www.kulturminnesok.no/kulturminnesok/kulturminne/?LOK_ID=", ?lokid) AS ?url)
?id <https://data.kulturminne.no/askeladden/schema/geo/point/etrs89> ?point .
optional {
?picture <https://data.kulturminne.no/bildearkivet/schema/lokalitet> ?id .
?picture <https://data.kulturminne.no/schema/source-link> ?link
BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid)
BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=400&rs=0&pg=0&sr=", ?lokid) AS ?img)
BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=75&rs=0&pg=0&sr=", ?lokid) AS ?thumbnail)
}
FILTER regex(?kommune, "^.*08[0-9]{2}") .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment