Status:

There are 77 sites (at time of writing, December, 2020) in AusPlots Rangelands where the points in the site_location_point table fail to create a WKT polygon string using the Python Shapely library.

SPARQL query to retrieve the list of sites that do not have a polygon in AnzoGraph.

PREFIX geosparql: <http://www.opengis.net/ont/geosparql#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix tern: <https://w3id.org/tern/ontologies/tern/>
prefix tern-loc: <https://w3id.org/tern/ontologies/loc/>
select *
where {
  graph <http://ausplots> {
    ?site_uri a tern:Site .
    ?site_uri rdfs:label ?site_label .
    filter not exists {
      ?site_uri geosparql:hasGeometry ?geometry .
      ?geometry geosparql:asWKT ?geometry_wkt .
      ?geometry a ?geometry_type .
      filter(?geometry_type = tern-loc:Polygon)
    }
  }
} 

We need to first determine why the Shapely library is failing to construct the polygon before contacting TERN Surveillance.