Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
I'm using Version 7.2.8.3235-pthreads of Virtuoso Open Source Edition with Docker.
I'm using GeoSPARQL with function bif:st_within in order to find which set of points are enclosed in a set of polygons. Apparently it works, but I've found lots of false positives, i.e. a point may be assigned to several polygons that are not overlapped.
I've isolated the problem in the attached turtle file, containing a plot with a point geometry and two municipalities, each one with a polygon geometry. The attached pdf shows a map the two municipalities (01042 and 48045) and the plot (yellow point).
I've tried this query:
select distinct ?plot ?muni where {
?plot a <http://prueba.es/Plot> ;
<http://www.opengis.net/ont/geosparql#asWKT> ?wktp .
?muni a <http://prueba.es/Municipality> ;
<http://www.opengis.net/ont/geosparql#asWKT> ?wktm .
FILTER ( bif:st_contains( ?wktm, ?wktp ) )
}
I'm using Version 7.2.8.3235-pthreads of Virtuoso Open Source Edition with Docker.
I'm using GeoSPARQL with function
bif:st_within
in order to find which set of points are enclosed in a set of polygons. Apparently it works, but I've found lots of false positives, i.e. a point may be assigned to several polygons that are not overlapped.I've isolated the problem in the attached turtle file, containing a plot with a point geometry and two municipalities, each one with a polygon geometry. The attached pdf shows a map the two municipalities (01042 and 48045) and the plot (yellow point).
I've tried this query:
And I get these results:
I've also tried with
bif:st_within
instead ofbif:st_contains
with the same result.Then, I've tried a new query using
bif:st_point
to create a point with the same coordinates of the plot:Now I get the correct result:
But if I try the previous query with
bif:st_within
as in:Then I've obtained again a false positive:
In conclusion, the functioning of functions
bif:st_within
andbif:st_contains
looks buggy to me. I hope it can be fixed.pruebageo.txt
map.pdf