PREFIX gleif-geo: <https://www.gleif.org/ontology/Geocoding/>
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#>

gleif-geo:GeocodedAddress a rdfs:Class ;
  rdfs:label "geocoded address"@en ;
  rdfs:comment "A geocoded address, derived from a physical address, with latitude and longitude information." ;
  rdfs:subClassOf <https://www.gleif.org/ontology/Base/PhysicalAddress> .

gleif-geo:hasStreet a rdf:Property ;
  rdfs:label "has street" ;
  rdfs:comment "The name of a street, as opposed to a house within it." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range <https://w3id.org/linkml/Any> .

gleif-geo:hasRegionText a rdf:Property ;
  rdfs:label "has region text" ;
  rdfs:comment "A textual representation of the state or region." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range <https://w3id.org/linkml/Any> .

gleif-geo:matchLevel a rdf:Property ;
  rdfs:label "match level" ;
  rdfs:comment "The most detailed address field that the geocoding was able to provide." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range <http://www.w3.org/2002/07/owl#DatatypeProperty> .

gleif-geo:matchDate a rdf:Property ;
  rdfs:label "has end"@en ;
  rdfs:comment "The date of the geocoding from the original address." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range xsd:dateTime .

gleif-geo:locationId a rdf:Property ;
  rdfs:label "location ID" ;
  rdfs:comment "A unique identifier representing a hash of the location." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range <https://w3id.org/linkml/Any> .

gleif-geo:originalAddress a rdf:Property ;
  rdfs:label "original address" ;
  rdfs:comment "The original address(es) from which the geocoding was derived." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range <https://www.gleif.org/ontology/Base/PhysicalAddress> .

gleif-geo:formattedAddressText a rdf:Property ;
  rdfs:label "formatted address text" ;
  rdfs:comment "An aggregated textual representation of the the fields produced by the geocoding as a comma-separated list of fields." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range <https://w3id.org/linkml/Any> .

gleif-geo:relevance a rdf:Property ;
  rdfs:label "bottom right" ;
  rdfs:comment "A value from 0 to 1 representing the percentage of the input that matched the returned address. 1 means that all input tokens were matched." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range xsd:decimal .

gleif-geo:originalAddressText a rdf:Property ;
  rdfs:label "original address text" ;
  rdfs:comment "An aggregated textual representation of the original address(es) from which the geocoding was derived, as a comma-separated list of fields with null where the field did not have a value." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range <https://w3id.org/linkml/Any> .

<https://www.gleif.org/ontology/Base/hasCity> a rdf:Property ;
  rdfs:range <https://w3id.org/linkml/Any> .

gleif-geo:matchType a rdf:Property ;
  rdfs:label "match type" ;
  rdfs:comment "Quality of the location match, either pointAddress or interpolated." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range gleif-geo:MatchType .

<https://www.gleif.org/ontology/Base/hasAddressNumber> a rdf:Property ;
  rdfs:range <https://w3id.org/linkml/Any> .

gleif-geo:hasBoundingBox a rdf:Property ;
  rdfs:label "has bounding box" ;
  rdfs:comment "The geographic area represented by the address." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range gleif-geo:BoundingBox .

gleif-geo:hasDistrict a rdf:Property ;
  rdfs:label "has district" ;
  rdfs:comment "A textual representation of the district." ;
  rdfs:domain gleif-geo:GeocodedAddress ;
  rdfs:range <https://w3id.org/linkml/Any> .

<https://www.gleif.org/ontology/Base/hasPostalCode> a rdf:Property ;
  rdfs:range <https://w3id.org/linkml/Any> .

<https://www.omg.org/spec/LCC/Countries/CountryRepresentation/Country> a rdfs:Class .

<http://www.w3.org/2003/01/geo/wgs84_pos#Point> a rdfs:Class .

<http://www.w3.org/2002/07/owl#DatatypeProperty> a rdfs:Class .

<http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing> a rdfs:Class .

<https://w3id.org/linkml/Any> a rdfs:Class ;
  rdfs:comment "An unconstrained type or object" .

<https://www.gleif.org/ontology/Base/PhysicalAddress> a rdfs:Class .

gleif-geo:BoundingBox a rdfs:Class ;
  rdfs:label "bounding box" ;
  rdfs:comment "A geographic rectangular area bounded by its top left and bottom right points." ;
  rdfs:subClassOf <http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing> .

gleif-geo:topLeft a rdf:Property ;
  rdfs:label "top left" ;
  rdfs:comment "The top left point of a bounding box." ;
  rdfs:domain gleif-geo:BoundingBox ;
  rdfs:range <http://www.w3.org/2003/01/geo/wgs84_pos#Point> .

gleif-geo:bottomRight a rdf:Property ;
  rdfs:label "bottom right" ;
  rdfs:comment "The bottom right point of a bounding box." ;
  rdfs:domain gleif-geo:BoundingBox ;
  rdfs:range <http://www.w3.org/2003/01/geo/wgs84_pos#Point> .

<https://www.gleif.org/ontology/Base/hasAddress> a rdf:Property ;
  rdfs:range <https://w3id.org/linkml/Any> .

<https://www.gleif.org/ontology/Base/hasCountry> a rdf:Property ;
  rdfs:range <https://w3id.org/linkml/Any> .

gleif-geo:hasGeocodedAddress a rdf:Property ;
  rdfs:label "has geocoded address" ;
  rdfs:comment "A geocoded address for the legal entity." ;
  rdfs:range gleif-geo:GeocodedAddress ;
  rdfs:subPropertyOf <https://www.gleif.org/ontology/Base/hasAddress> .

gleif-geo:MatchType a rdfs:Class ;
  rdfs:label "match type" ;
  rdfs:comment "Quality of the location match, either pointAddress or interpolated." .

gleif-geo:MatchTypePointAddress a gleif-geo:MatchType ;
  rdfs:label "match type point address" ;
  rdfs:comment "The location matches the specific address." .

gleif-geo:MatchTypeInterpolated a gleif-geo:MatchType ;
  rdfs:label "match type interpolated" ;
  rdfs:comment "The location was interpolated from known locations of adjacent addresses." .
