PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wgs84pos: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX linkml: <https://w3id.org/linkml/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX vann: <http://purl.org/vocab/vann/>

<http://www.w3.org/2003/01/geo/wgs84_pos> a owl:Ontology ;
  vann:preferredNamespacePrefix "wgs84pos" ;
  vann:preferredNamespaceUri "http://www.w3.org/2003/01/geo/wgs84_pos#"^^xsd:anyURI ;
  sh:declare [
    sh:prefix "wgs84pos" ;
    sh:namespace "http://www.w3.org/2003/01/geo/wgs84_pos#"^^xsd:anyURI
  ] , [
    sh:prefix "linkml" ;
    sh:namespace "https://w3id.org/linkml/"^^xsd:anyURI
  ] , [
    sh:prefix "foaf" ;
    sh:namespace "http://xmlns.com/foaf/0.1/"^^xsd:anyURI
  ] .

wgs84pos:Point a owl:Class ;
  rdfs:label "point" ;
  rdfs:comment """A point, typically described using a coordinate system relative to Earth, such as WGS84.
  """ ;
  skos:note """ 
Uniquely identified by lat/long/alt. i.e.

spaciallyIntersects(P1, P2) :- lat(P1, LAT), long(P1, LONG), alt(P1, ALT),
  lat(P2, LAT), long(P2, LONG), alt(P2, ALT).

sameThing(P1, P2) :- type(P1, Point), type(P2, Point), spaciallyIntersects(P1, P2).
  """ ;
  rdfs:subClassOf wgs84pos:SpatialThing .

wgs84pos:SpatialThing a owl:Class ;
  rdfs:label "SpatialThing" ;
  rdfs:comment """Anything with spatial extent, i.e. size, shape, or position.
 e.g. people, places, bowling balls, as well as abstract areas like cubes.
""" ;
  rdfs:subClassOf [
    a owl:Restriction ;
    owl:onProperty wgs84pos:alt ;
    owl:allValuesFrom owl:Thing
  ] , [
    a owl:Restriction ;
    owl:onProperty wgs84pos:lat ;
    owl:allValuesFrom owl:Thing
  ] , [
    a owl:Restriction ;
    owl:onProperty wgs84pos:long ;
    owl:allValuesFrom owl:Thing
  ] .

wgs84pos:location a owl:ObjectProperty ;
  rdfs:label "location" ;
  rdfs:comment """The relation between something and the point, 
 or other geometrical thing in space, where it is.  For example, the realtionship between
 a radio tower and a Point with a given lat and long.
 Or a relationship between a park and its outline as a closed arc of points, or a road and
 its location as a arc (a sequence of points).
 Clearly in practice there will be limit to the accuracy of any such statement, but one would expect
 an accuracy appropriate for the size of the object and uses such as mapping .
 """ ;
  rdfs:range wgs84pos:SpatialThing ;
  rdfs:subPropertyOf foaf:based_near .

wgs84pos:alt a owl:ObjectProperty ;
  rdfs:label "altitude" ;
  rdfs:comment """The WGS84 altitude of a SpatialThing (decimal meters 
above the local reference ellipsoid).""" ;
  rdfs:domain wgs84pos:SpatialThing .

wgs84pos:lat a owl:ObjectProperty ;
  rdfs:label "latitude" ;
  rdfs:comment "The WGS84 latitude of a SpatialThing (decimal degrees)." ;
  rdfs:domain wgs84pos:SpatialThing .

wgs84pos:long a owl:ObjectProperty ;
  rdfs:label "longitude" ;
  rdfs:comment "The WGS84 longitude of a SpatialThing (decimal degrees)." ;
  rdfs:domain wgs84pos:SpatialThing .

wgs84pos:lat_long a owl:ObjectProperty ;
  rdfs:label "lat/long" ;
  rdfs:comment "A comma-separated representation of a latitude, longitude coordinate." .

foaf:based_near a owl:ObjectProperty .

vann:preferredNamespacePrefix a owl:AnnotationProperty .

vann:preferredNamespaceUri a owl:AnnotationProperty .

skos:note a owl:AnnotationProperty .

sh:declare a owl:AnnotationProperty .

sh:prefix a owl:AnnotationProperty .

sh:namespace a owl:AnnotationProperty .
