Ticket #76 (new defect)

Opened 3 years ago

Last modified 3 years ago

ST_Transform over nested BGP throws an exception

Reported by: kkyzir Owned by: pyravlos-team
Priority: major Milestone: LEO Y1 review
Component: postgis Version: all
Keywords: Cc:

Description

Applying a transformation function to the results of a nested BGP throws an error.

RDF graph:
<http://www.example.com/r1> <http://www.opengis.net/ont/geosparql#asWKT> "<http://www.opengis.net/def/crs/EPSG/0/3035> POINT(5176650.701895 1934878.92062201)"<http://www.opengis.net/ont/geosparql#wktLiteral> .
<http://www.example.com/r2> <http://www.opengis.net/ont/geosparql#asWKT> "<http://www.opengis.net/def/crs/EPSG/0/3035> POINT(5246877.209307 2056400.33050172)"<http://www.opengis.net/ont/geosparql#wktLiteral> .

stSPARQL/GeoSPARQL Query (working):
[Error: Query filter requires field and constraints separated by a "="] strdf: <http://strdf.di.uoa.gr/ontology#>
SELECT (strdf:transform(strdf:union(?geom),<http://www.opengis.net/def/crs/EPSG/0/4326>) as ?geometries)
WHERE {?s <http://www.opengis.net/ont/geosparql#asWKT> ?geom}

results:
"MULTIPOINT ((20.000000000000018 40.000000030706246), (21.00000000000005 41.00000003262155))"http://strdf.di.uoa.gr/ontology#WKT

stSPRQL/GeoSPARQL query (working):
PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
SELECT (strdf:union(?wgs84geom) AS ?ugeoms)
WHERE {{
SELECT (strdf:transform(?geom, <http://www.opengis.net/def/crs/EPSG/0/4326>) AS ?wgs84geom)
WHERE {?s <http://www.opengis.net/ont/geosparql#asWKT> ?geom}
}}

results:
"MULTIPOINT ((20.00000000000002 39.999999986323296), (21.00000000000005 40.99999998726566))"http://strdf.di.uoa.gr/ontology#WKT

stSPRQL/GeoSPARQL query (not working):
PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
SELECT (strdf:transform(?ugeom, <http://www.opengis.net/def/crs/EPSG/0/4326>) AS ?wgs84ugeoms)
WHERE {{
SELECT (strdf:union(?geom) AS ?ugeom)
WHERE {?s <http://www.opengis.net/ont/geosparql#asWKT> ?geom}
}}

Exception: org.openrdf.query.QueryEvaluationException?: org.openrdf.sail.rdbms.exceptions.RdbmsQueryEvaluationException?: org.postgresql.util.PSQLException: ERROR: function st_transform(unknown, unknown) is not unique

Generated SQL query:
SELECT a0.subj, u_s.value, a0.obj, ST_AsBinary(ST_Transform(l_geom.strdfgeo,l_geom.srid)),l_geom.srid, d_geom.value,

ST_AsBinary(ST_Transform(ST_Transform( NULL ,NULL),4326)),4326

FROM aswkt_2 a0

INNER JOIN geo_values l_geom ON (l_geom.id = a0.obj)
INNER JOIN datatype_values d_geom ON (d_geom.id = a0.obj)
LEFT JOIN uri_values u_s ON (u_s.id = a0.subj)

Change History

comment:1 Changed 3 years ago by kkyzir

  • Milestone set to LEO Y1 review
Note: See TracTickets for help on using tickets.