Skip to content

Commit

Permalink
Add stray geo tweaks from lab sprint
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasl committed Apr 29, 2024
1 parent 6abc448 commit c8c8215
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
23 changes: 16 additions & 7 deletions source/geo/construct-geocore.rq
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,27 @@ CONSTRUCT {
:startDate ?foundingDate ;
:image ?image .

?geo a :EarthGlobeCoordinate ;
:code ?geocode ;
:latitude ?lat ;
:longitude ?long ;
?geo a :EarthGlobeCoordinates ;
:value ?geocode ;
:geoLatitude ?lat ;
:geoLongitude ?long ;
:geoPrecision ?geoPrecision .

} WHERE {
?wdplace a|wdt:P31 ?type ;
wdt:P17 wd:Q34 ;
rdfs:label ?label .
wdt:P17 wd:Q34 . # :country Sweden

FILTER EXISTS { ?type wdt:P279* wd:Q914262 } # administrative territorial entity of Sweden
#FILTER EXISTS {
# {
# ?type wdt:P279* wd:Q914262 # administrative territorial entity of Sweden
# } UNION {
# ?wdplace wdt:P1376 [] . # :capital :label "centralort"@sv
# }
#}

?wdplace rdfs:label ?label .

FILTER EXISTS { ?type wdt:P279* wd:Q914262 } # administrative territorial entity of Sweden
FILTER NOT EXISTS { ?wdplace wdt:P576 ?dissolutionDate }
OPTIONAL { ?wdplace wdt:P571 ?foundingDate }

Expand Down
21 changes: 21 additions & 0 deletions source/vocab/details.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
@prefix rdaz: <http://rdaregistry.info/Elements/z/> .
@prefix rdau: <http://rdaregistry.info/Elements/u/> .

@prefix wikibase: <http://wikiba.se/ontology#> .

@prefix : <https://id.kb.se/vocab/> .
@prefix kbrel: <https://id.kb.se/relator/> .

Expand Down Expand Up @@ -1531,6 +1533,25 @@
rdfs:label "Geographic coverage"@en, "Geografisk täckning"@sv;
owl:equivalentClass bf2:GeographicCoverage .

:geo a owl:ObjectProperty;
rdfs:label "Geographic coordinates"@en, "Geografiska koordinater"@sv;
sdo:domainIncludes :Place, :Library;
rdfs:range :GlobeCoordinates;
owl:equivalentProperty sdo:geo .

:GlobeCoordinates a owl:Class ;
rdfs:subClassOf sdo:GeoCoordinates, wikibase:GlobecoordinateValue .

:geoLatitude owl:equivalentProperty sdo:latitude, wikibase:geoLatitude .
:geoLongitude owl:equivalentProperty sdo:longitude, wikibase:geoLongitude .
:geoPrecision owl:equivalentProperty wikibase:geoPrecision .

:EarthGlobeCoordinates a owl:Class ;
rdfs:label "Earth globe coordinates"@en, "jordglobskoordinater"@sv;
rdfs:subClassOf :GlobeCoordinates, [ a owl:Restriction;
owl:onProperty wikibase:geoGlobe ;
owl:hasValue <http://www.wikidata.org/entity/Q2> ] .

:geographicCoverage a owl:ObjectProperty;
rdfs:label "Geographic coverage"@en, "Geografisk täckning"@sv;
rdfs:domain :Creation;
Expand Down

0 comments on commit c8c8215

Please sign in to comment.