@hwilliams /cc @pvk @imikhailov @kidehen
As I noted in issue#295, the user is responsible for avoiding nonsense data.
As I also noted there, even though the current Wikidata dumps (among other data) will be problematic at various points in future (because the URIs they’re using to designate some coordinate reference systems (CRS) do not actually dereference to such definitions), that data should still load without error, as these are valid geo:wktLiteral
according to that spec –
8.5 Requirements for WKT Serialization (serialization=WKT)
This section establishes the requirements for representing geometry data in RDF based on WKT as defined by Simple Features [ISO 19125-1].
8.5.1 RDFS Datatypes
This section defines one RDFS Datatype: http://www.opengis.net/ont/geosparql#wktLiteral
.
RDFS Datatype: geo:wktLiteral
geo:wktLiteral a rdfs:Datatype;
rdfs:isDefinedBy <http://www.opengis.net/spec/geosparql/1.0>;
rdfs:label "Well-known Text Literal"@en;
rdfs:comment "A Well-known Text serialization of a geometry object."@en .
Req 10 All RDFS Literals of type geo:wktLiteral
shall consist of an optional URI identifying the coordinate reference system followed by Simple Features Well Known Text (WKT) describing a geometric value. Valid geo:wktLiterals
are formed by concatenating a valid, absolute URI as defined in [RFC 2396], one or more spaces (Unicode U+0020 character) as a separator, and a WKT string as defined in Simple Features [ISO 19125-1].
/req/geometry-extension/wkt-literal
For geo:wktLiterals
, the beginning URI identifies the spatial reference system for the geometry. The OGC maintains a set of CRS URIs under the http://www.opengis.net/def/crs/
namespace. This leading spatial reference system URI is optional. In the absence of a leading spatial reference system URI, the following spatial reference system URI will be assumed:
<http://www.opengis.net/def/crs/OGC/1.3/CRS84>
This URI denotes WGS 84 longitude-latitude.
Req 11 The URI http://www.opengis.net/def/crs/OGC/1.3/CRS84
shall be assumed as the spatial reference system for geo:wktLiterals that do not specify an explicit spatial reference system URI.
/req/geometry-extension/wkt-literal-default-srs
Req 12 Coordinate tuples within geo:wktLiterals
shall be interpreted using the axis order defined in the spatial reference system used.
/req/geometry-extension/wkt-axis-order
The example geo:wktLiteral
below encodes a point geometry using the default WGS 84 geodetic longitude-latitude spatial reference system for Simple Features 1.0:
"Point(-83.38 33.95)"^^<http://www.opengis.net/ont/geosparql#wktLiteral>
A second example below encodes the same point using <http://www.opengis.net/def/crs/EPSG/0/4326>
: a WGS 84 geodetic latitude-longitude spatial reference system (note that this spatial reference system defines a different axis order):
"<http://www.opengis.net/def/crs/EPSG/0/4326>
Point(33.95 -83.38)"^^<http://www.opengis.net/ont/geosparql#wktLiteral>
Req 13 An empty RDFS Literal of type geo:wktLiteral
shall be interpreted as an empty geometry.
/req/geometry-extension/wkt-literal-empty
Errors will be appropriate when using GeoSPARQL and other SQL/MM or SPARQL/MM comparison functions against these geo:wktLiteral
values which have URIs in the CRS position that do not dereference to CRS definitions and/or when the CRS definitions do not provide sufficient information for translation between the different CRS in geo:wktLiteral
values which are being compared – but the time for such CRS evaluation is not data-load.