BASE <https://w3id.org/itsdata/location/v1/>
PREFIX : <https://w3id.org/itsdata/location/v1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX cdm1: <https://w3id.org/citydata/part1/v1/>
PREFIX its-core: <https://w3id.org/itsdata/core/v1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX vann: <http://purl.org/vocab/vann/>

:PointSHACL
    a owl:Ontology ;
    dcterms:title "SHACL rules for ITS Point Referencing"@en ;
    skos:definition "SHACL shapes for point-based locations and point geometries."@en ;
    its-core:draft "true" ;
    dcterms:created "Draft" ;
    dcterms:modified "2026-04-29"^^xsd:date ;
    vann:preferredNamespaceUri     "https://w3id.org/itsdata/location/v1/";
    vann:preferredNamespacePrefix  "its-location";
    owl:versionInfo "0.0.1" ;
    owl:versionIRI <PointSHACL/r0.1> ;
    owl:imports :LocationCoreSHACL .

#################################################################
# Node shapes
#################################################################

:PointFeatureShape
    a sh:NodeShape ;
    sh:targetClass :PointFeature ;
    sh:and ( :FeatureShape ) ;
    sh:property [
        sh:path :bearing ;
        sh:node its-core:MaxOneShape ;
        sh:class its-core:Bearing ;
    ] .

:PointGeometryShape
    a sh:NodeShape ;
    sh:targetClass :PointGeometry ;
    sh:and ( :GeometryShape ) .

:PointByCodeShape
    a sh:NodeShape ;
    sh:targetClass :PointByCode ;
    sh:and ( :PointGeometryShape :CodedGeometryShape ) .

:PointByCoordinatesShape a sh:NodeShape ;
    sh:targetClass :PointByCoordinates ;
    sh:and ( :CoordinateGeometryShape ) ;
    sh:and ( :PointGeometryShape ) ;
    sh:property [
        sh:path :hasPositionAccuracy ;
        sh:node its-core:MaxOneShape ;
        sh:class :PositionAccuracy ;
    ] ;
    sh:property [
        sh:path :hasPositionConfidenceEllipse ;
        sh:node its-core:MaxOneShape ;
        sh:class :PositionConfidenceEllipse ;
    ] ;
    sh:property [
        sh:path :hasElevation ;
        sh:node its-core:MaxOneShape ;
        sh:class :Elevation ;
    ] ;
    sh:property [
        sh:path :hasElevationAccuracy ;
        sh:node its-core:MaxOneShape ;
        sh:class :ElevationAccuracy ;
    ] .

:PointByGeoCoordinatesShape
    a sh:NodeShape ;
    sh:targetClass :PointByGeoCoordinates ;
    sh:and ( :PointByCoordinatesShape ) ;
    sh:property [
        sh:path :latitude ;
        sh:node its-core:ExactlyOneShape ;
        sh:datatype xsd:decimal ;
        sh:minInclusive -90 ;
        sh:maxInclusive 90 ;
    ] ;
    sh:property [
        sh:path :longitude ;
        sh:node its-core:ExactlyOneShape ;
        sh:datatype xsd:decimal ;
        sh:minInclusive -180 ;
        sh:maxInclusive 180 ;
    ] .

:PointByProjectedCoordinatesShape
    a sh:NodeShape ;
    sh:targetClass :PointByProjectedCoordinates ;
    sh:and ( :PointByCoordinatesShape ) ;
    sh:property [
        sh:path :northing ;
        sh:node its-core:ExactlyOneShape ;
        sh:datatype xsd:decimal ;
    ] ;
    sh:property [
        sh:path :easting ;
        sh:node its-core:ExactlyOneShape ;
        sh:datatype xsd:decimal ;
    ] .

:ElevationShape
    a sh:NodeShape ;
    sh:targetClass :Elevation ;
    sh:property [
        sh:path :hasElevationReference ;
        sh:node its-core:ExactlyOneShape ;
        sh:class :ElevationReferenceCode ;
    ] ;
    sh:property [
        sh:path :hasElevationDistance ;
        sh:node its-core:MaxOneShape ;
        sh:class cdm1:Length ;
    ] ;
    sh:property [
        sh:path :hasElevationHeightCode ;
        sh:node its-core:MaxOneShape ;
        sh:class :ElevationHeightCode ;
    ] ;
    sh:property [
        sh:path :hasElevationAccuracy ;
        sh:node its-core:MaxOneShape ;
        sh:class :ElevationAccuracy ;
    ] .

:DistanceAccuracyShape
    a sh:NodeShape ;
    sh:targetClass :DistanceAccuracy ;
    sh:property [
        sh:path :hasDistanceAccuracy ;
        sh:node its-core:ExactlyOneShape ;
        sh:class cdm1:Length ;
    ] ;
    sh:property [
        sh:path :confidencePercentage ;
        sh:node its-core:ExactlyOneShape ;
        sh:class cdm1:Ratio ;
    ] ;
    sh:property [
        sh:path :distanceAccuracyErrorCode ;
        sh:node its-core:MaxOneShape ;
        sh:class :MeasurementErrorCode ;
    ] .

:ElevationAccuracyShape
    a sh:NodeShape ;
    sh:targetClass :ElevationAccuracy ;
    sh:and ( :DistanceAccuracyShape ) .

:PositionAccuracyShape
    a sh:NodeShape ;
    sh:targetClass :PositionAccuracy ;
    sh:and ( :DistanceAccuracyShape ) .

:PositionConfidenceEllipseShape
    a sh:NodeShape ;
    sh:targetClass :PositionConfidenceEllipse ;
    sh:property [
        sh:path :semiMajorAxisLength ;
        sh:node its-core:MaxOneShape ;
        sh:class cdm1:Length ;
    ] ;
    sh:property [
        sh:path :semiMinorAxisLength ;
        sh:node its-core:MaxOneShape ;
        sh:class cdm1:Length ;
    ] ;
    sh:property [
        sh:path :semiMajorAxisOrientation ;
        sh:node its-core:MaxOneShape ;
        sh:class its-core:Bearing ;
    ] ;
    sh:property [
        sh:path :semiMajorAxisLengthErrorCode ;
        sh:node its-core:MaxOneShape ;
        sh:class :MeasurementErrorCode ;
    ] ;
    sh:property [
        sh:path :semiMinorAxisLengthErrorCode ;
        sh:node its-core:MaxOneShape ;
        sh:class :MeasurementErrorCode ;
    ] ;
    sh:property [
        sh:path :semiMajorAxisOrientationErrorCode ;
        sh:node its-core:MaxOneShape ;
        sh:class :MeasurementErrorCode ;
    ] .

