1

I'm having some issues loading data with non-default projections into GraphDB.

Using the example files from the documentation website, but changing the projection from CRS84 to CRS83, results in no intersections being found when running example 2 (also from the website). Does GraphDB support loading data with different projections? If so, is there something extra I need to do in order for this to work?

If I leave the projection as CRS84, everything works as expected.

Here's the query I'm attempting to execute:

PREFIX my: <http://example.org/ApplicationSchema#>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>

SELECT ?f
WHERE {
    ?f my:hasPointGeometry ?fGeom .
    ?fGeom geo:asWKT ?fWKT .
    FILTER (geof:sfWithin(?fWKT, '''
        <http://www.opengis.net/def/crs/OGC/1.3/CRS83>
        Polygon ((-83.4 34.0, -83.1 34.0, -83.1 34.2, -83.4 34.2, -83.4 34.0))
        '''^^geo:wktLiteral))
}
nickrobison
  • 150
  • 2
  • 14
  • Please post your query with the changed projection from CRS84 to CRS83. – vassil_momtchev Mar 12 '18 at 15:45
  • I've edited the question to provide the example query. As a note, I also modified the geosparql-simple-features-geometries.rdf and geosparql-example.rdf files to use the CRS83 projection. Simply by changing the URI. The provided coordinates should be valid for both projections. – nickrobison Mar 12 '18 at 16:28

1 Answers1

0

First, as a geomatician, "changing the projection from CRS84 to CRS83" could be disastrous. If you simply change the character "4" by a "3", your data are now corrupted. (Perhaps have I misunderstood what "changing" means for you).

The transformation from a CRS to another is a mathematical process that involves reprojection. It cannot be done by simply change the name of the CRS.

Here is a link to understand the many differences between the two coordinate systems : External documentation

Finally, the geof functions need both the subject and the object to be expressed in the same CRS. It is you, aware of the projections, to keep coherence. If you reproject one of them, the second need to be reprojected too. This to keep consistancy in your data/query.

Gilles-Antoine Nys
  • 1,481
  • 16
  • 21
  • Thanks for the response! Modifying the CRS was merely an attempt to replicate an issue we were facing in another system that failed to return data when datasets which used coordinate systems other than CRS84., Even when both the subject and object used the same projection system. In this example, I did simply change the CRS value to 83 in the underlying RDF file, while leaving the data alone. Not a great solution, but I was looking for an easy to reproduce issue. – nickrobison Apr 30 '18 at 16:35