Ticket #43 (closed defect: fixed)

Opened 5 years ago

Last modified 3 years ago

ST_MakeLine does not work in select clause with two constant geometries

Reported by: charnik Owned by: charnik
Priority: minor Milestone: Access PostGIS functions from stSPARQL
Component: generaldb Version: all
Keywords: ST_MakeLine, select clause, query evaluation exception, constant geometry Cc:

Description

The following query raises an exception:

PREFIX postgis: <http://postgis.net/>
SELECT ?s
(postgis:ST_MakeLine("POINT(0 0)"<http://strdf.di.uoa.gr/ontology#WKT>, "POINT(5 5)"<http://strdf.di.uoa.gr/ontology#WKT>) as ?l)
WHERE {

?s ?p ?o .

}
LIMIT 1

Change History

comment:1 Changed 3 years ago by charnik

  • Owner changed from pyravlos-team to charnik
  • Status changed from new to assigned

Try other example and interesting queries on http://test.strabon.di.uoa.gr/NOA endpoint.

PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
PREFIX postgis: <http://postgis.net/>

SELECT (postgis:ST_MakeLine("POINT(679998.9988848678 4252209.920746813);http://www.o opengis.net/def/crs/EPSG/0/2100"^^strdf:WKT, "POINT(672398.9988514321 4229409.921352152);http://www.o opengis.net/def/crs/EPSG/0/2100"^^strdf:WKT) as ?line)
WHERE {
 noa:HMSG1_RSS_120819_1730_1 noa:hasGeometry ?g1 .
 noa:HMSG1_RSS_120819_1730_12 noa:hasGeometry ?g2 .
}
PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
PREFIX postgis: <http://postgis.net/>

SELECT ?g1 ?g2 (postgis:ST_MakeLine(postgis:ST_Centroid(?g1), postgis:ST_Centroid(?g2)) as ?line)
WHERE {
 noa:HMSG1_RSS_120819_1730_1 noa:hasGeometry ?g1 .
 noa:HMSG1_RSS_120819_1730_12 noa:hasGeometry ?g2 .
}

Taking the buffer of the constructed line!

PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
PREFIX postgis: <http://postgis.net/>

SELECT ?g1 ?g2 (strdf:buffer(postgis:ST_MakeLine(postgis:ST_Centroid(?g1), postgis:ST_Centroid(?g2)), 3000, <http://www.opengis.net/def/uom/OGC/1.0/metre>) as ?line)
WHERE {
 noa:HMSG1_RSS_120819_1730_1 noa:hasGeometry ?g1 .
 noa:HMSG1_RSS_120819_1730_12 noa:hasGeometry ?g2 .
}

Connnecting the hotspots with a point in Peloponnese.

PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
PREFIX postgis: <http://postgis.net/>

SELECT ?g1 ?g2 
(postgis:ST_MakeLine(postgis:ST_Centroid(?g1), "POINT(23 37)"^^strdf:WKT) as ?l1)
(postgis:ST_MakeLine(postgis:ST_Centroid(?g2), "POINT(23 37)"^^strdf:WKT) as ?l2)
WHERE {
 noa:HMSG1_RSS_120819_1730_1 noa:hasGeometry ?g1 .
 noa:HMSG1_RSS_120819_1730_12 noa:hasGeometry ?g2 .
}

comment:2 Changed 3 years ago by charnik

  • Status changed from assigned to closed
  • Resolution set to fixed

I cannot reproduce the exception no matter what I try.

Note: See TracTickets for help on using tickets.