Skip to content

Commit

Permalink
allow geojson or dcterms spatial for geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-metalinkage committed Jul 24, 2024
1 parent 62da699 commit a55f064
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Features with topology

This repository defines an extension to GeoJSON or FG-JSON definining topological relationships between features based on identifiers.
This repository defines an extension to GeoJSON or FG-JSON defining topological relationships between features based on identifiers.

The set of components are listed [here](https://ogcincubator.github.io/topo-feature/)

The implementation provides a JSON schema and a corresponding JSON-LD context that can turn topology references into object properties.

Topological consistency functions can be described using SHACL rules - for example that a Polygon geometry must reference LineStrings, and Linestrings must reference Point objects.
Topological consistency functions can be described using SHACL rules - for example that a Polygon geometry must reference LineStrings, and LineStrings must reference Point objects.

This is extensible (unlike topoJSON) and can span features across any collection schemas used to group them.

Using features rather than geometries as the topology reference allows arbitrary additional metadata to be provided about the nature of boundaries between features.

NB. GeoJSON simple geometries and TopoJSON compact topologies can be derived from the model if required.

[More information on design and usage](https://github.com/opengeospatial/bblock-template/blob/master/USAGE.md)
[More information on design and usage](https://ogcincubator.github.io/bblocks-docs/)


Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ topo:testTopoLinesReferencePoints
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix geojson: <https://purl.org/geojson/vocab#>
prefix dct: <http://purl.org/dc/terms/>
PREFIX geosparql: <http://www.opengis.net/ont/geosparql#>

SELECT $this (geojson:topology as ?path) (?ref as ?value)
WHERE {
$this geojson:relatedFeatures/rdf:rest*/rdf:first ?ref .
FILTER NOT EXISTS {
?ref geojson:geometry/rdf:type geojson:Point }
?ref (geojson:geometry|geosparql:hasGeometry|dct:spatial)/rdf:type geojson:Point }
}
""" ; ]
.
Expand Down

0 comments on commit a55f064

Please sign in to comment.