Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BDRSPS-918] First stab adding coordinateUncertaintyInMeters #290

Merged
merged 12 commits into from
Nov 6, 2024
5 changes: 5 additions & 0 deletions abis_mapping/templates/survey_metadata/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ def add_spatial_coverage(
# Extract relevant values
datum = row["geodeticDatum"]
sc_geometry = row["spatialCoverageWKT"]
spatial_accuracy = row["coordinateUncertaintyInMeters"] if "coordinateUncertaintyInMeters" in row else None
chungvl marked this conversation as resolved.
Show resolved Hide resolved

if not (datum and sc_geometry):
return
Expand All @@ -518,6 +519,10 @@ def add_spatial_coverage(
graph.add((geometry_node, a, utils.namespaces.GEO.Geometry))
graph.add((geometry_node, utils.namespaces.GEO.asWKT, geometry.to_transformed_crs_rdf_literal()))

if spatial_accuracy is not None:
accuracy = rdflib.Literal(spatial_accuracy, datatype=rdflib.XSD.double)
graph.add((geometry_node, utils.namespaces.GEO.hasMetricSpatialAccuracy, accuracy))
chungvl marked this conversation as resolved.
Show resolved Hide resolved

self.add_geometry_supplied_as(
subj=uri,
pred=utils.namespaces.GEO.hasGeometry,
chungvl marked this conversation as resolved.
Show resolved Hide resolved
Expand Down