New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ST_Intersects with MultiPolygons returns 42000 Error GEO #775
Comments
I have to clarify that the outer intersect in the query: Each of the inner queries ( |
Please note that |
Do we have a Turtle doc containing the data in question so we can load and test so our URIBurner instance? |
@rapw3k - We'd like to work on this further with you. To do so, we'll need a data dump that we can load locally, for best analysis. If you don't want to make such a dump public, you can email a private download link to us. |
Hi @TallTed @kidehen, I loaded new datasets and made sure no geometry related issues were in other ones. Then I upgraded virtuoso to latest version 07.20.3229 . Now it is worse. I cannot even query previous datasets that were working fine. See sample file (nt) that you can download and use it for testing. I tried simple query below, and I get error: Virtuoso 42000 Error GEO..: for after check of geo intersects, some shape types (e.g., polygon rings and curves) are not yet supported. Any ideas? PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
PREFIX poi: <http://www.openvoc.eu/poi#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foodie-cz: <http://foodie-cloud.com/model/foodie-cz#>
PREFIX foodie: <http://foodie-cloud.com/model/foodie#>
PREFIX olu: <http://w3id.org/foodie/olu#>
SELECT DISTINCT ?plot ?code ?shortId ?landUse ?coordPlotFinal
FROM <http://w3id.org/foodie/open/cz/180308_pLPIS_WGS_sample#>
WHERE{
?plot a foodie:Plot ;
foodie:code ?code ;
foodie-cz:shortId ?shortId ;
olu:specificLandUse ?landUse ;
geo:hasGeometry ?geoPlot .
?geoPlot ogcgs:asWKT ?coordPlotFinal .
FILTER(bif:st_intersects (?coordPlotFinal, bif:st_geomFromText("POLYGON((15.921601771283576 49.78152920564588,15.877656458783576 48.6876051971939,18.333100794721076 48.65858571922563,18.327607630658576 49.79571495785491,15.921601771283576 49.78152920564588))"))) .
} |
@rapw3k The current Virtuoso 7 open source versions only supports points and does not support other geometry shapes/types. Support for additional geometry types like polygon, multi-line strings, multi-polygons, geometry collections and GeoSPARQL has been added to the latest Virtuoso 8.1+ commercial product, thus loading your dataset into our uriburner.com instance, the query you provide above does run, see:
Adding similar support to Virtuoso open source is scheduled to be done but not available yet ... |
Hi @HughWilliams , I am pretty sure, support for other geometry types including polygon and multi polygon were supported. This was working (in most cases) before upgrading to latest version. I made several demoes using points, polygons and multi-polygons. Also documentation supports this claim: So, it is not a commercial product feature, or at least it was not. I would very disappointed if that would be the case. |
@rapw3k: The only way this could have previously work is if you had built form the old "v7fasttrack" R&D branch:
where some of this functionality had been made available sometime ago as detailed at:
and the productisation has not been completed until now for addition to the main archives ... |
@HughWilliams Besides, the documentation says that the v7fasttrack is only needed for the Virtuoso v7proj4 plugin module that is required for performing transformation between different co-ordinates systems using the ST_Transform() function. PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
PREFIX poi: <http://www.openvoc.eu/poi#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foodie-cz: <http://foodie-cloud.com/model/foodie-cz#>
PREFIX foodie: <http://foodie-cloud.com/model/foodie#>
PREFIX olu: <http://w3id.org/foodie/olu#>
SELECT ?waterBody ?label (bif:GeometryType (?coordWBody) as ?shapeType)
FROM <http://w3id.org/foodie/open/cz/Water_bodies_buff25m_WGS#>
WHERE {
?waterBody a foodie-cz:WaterBody ;
rdfs:label ?label ;
geo:hasGeometry ?geoWBody .
?geoWBody ogcgs:asWKT ?coordWBody .
FILTER(bif:st_intersects (?coordWBody, bif:st_geomFromText("POLYGON((13.463186854291394 50.22782104565781,13.52405965702576 50.22782104571184,13.523373011517947 50.18359184367178,13.464560145307019 50.18359184367178,13.463186854291394 50.22782104565781))"))) .
}
order by ?shapeType
|
@rapw3k: Correction, my mistake ... the work on polygons and other shapes was added to open source and commercial when the first phase was done a few years ago as I have used it in both ... but the necessary plugins modules for GeoSPARQL support/compliance and performing CRS transformations in the v7fasttrack branch were not completed ... they are now completed and currently available in the latest in-house Virtuoso 8.1 commercial archive (as running on uriburner.com) and to be scheduled for addition the to open source archive ... so the original comment still remains true in that this issue will be fixed when the work from commercial archive is made available in the open source archive ... |
Hi @HughWilliams , sorry but your answer is still not clear to me...
First key question: Why the same simple query for practical effects (intersects between polygon and multipolygons) works for one graph [2] and not for another [1] ? [1] #775 (comment) |
You can also see the release notes from https://github.com/openlink/virtuoso-opensource/blob/stable/7/NEWS.md#february-17-2015-v720 GEO functions Added support for SPARQL INSERT with GEO literals |
2015 is when the support for the additional geometry shapes/functions was added to open source and commercial to improve our Geo Spatial support in Virtuoso (SPARQL & SQL) ... Note the release note says "Added support for upcoming proj4 plugin" , which is what has been added to Virtuoso 8 commercial now and then needs to also be added to open source ... What do you mean by GeoSPARQL (https://en.wikipedia.org/wiki/GeoSPARQL) as it is a standard using geo: and geof: prefixes that Virtuoso 7 does not support ... so although we support polygons and other Geometry types in open source we are not GeoSPARL compliant, until the work from commercial is made available in open source ... With regards to your issue with Geo query that worked in 3217 but not in 3229, it could be due to a bug or regression, but as we have tested with the latest GeoSpatial work (to be GeoSPARQL compliant) done in commercial, when this is made available in open source it will also work ... |
For my purposes it was enough for now to use the bif: geo functions to manipulate geospatial data.... To conclude, I understand you cannot support me with these issues because I am using v7 open source, and you have solved all issues in v8 which is commercial, and you plan someday to push these fixes to v7 (or v8 open source?) but you dont know when (date) that will happen, I am right? [1] https://www.slideshare.net/rapw3k/publication-of-inspirebased-agricultural-linked-data |
@rapw3k: It is planned than these updates will be made to the existing Virtuoso 7 open source code base and this will be soon, although no date has been set for it yet ... |
Yes that was my guess... I was hoping you had also a v7 uriburner for support.... Nevertheless, the question: Why the same simple query for practical effects (intersects between polygon and multipolygons) works for one graph [2] and not for another [1] is unclear I also point out that the less accurate bif:st_may_intersect works even with the initial (more complex) query. [1] #775 (comment) |
I reverted to 07.20.3217, and is much better, all simple queries above work. I just come back to my original issue, that the complex query sometimes works but sometimes it throws error, depending on the input polygon in the intersect... As a temporal workaround (until either v8 updates are pushed to virtuoso OS, or other solutions like Straton are tested) -> when there is an error, we can use the less accurate bif:st_may_intersect |
Hi,
Some months ago, I had an issue with
ST_Intersects
with complex polygons, I got error:Virtuoso 42000 Error GEO..: for after check of geo intersects, some shape types (e.g., polygon rings and curves) are not yet supported
; see https://www.mail-archive.com/virtuoso-users@lists.sourceforge.net/msg08182.html@HughWilliams recommended to upgrade virtuoso. After I did it, this issue got solved with that query. However, now I am now having the same issue but with other query....
I am using Virtuoso version 07.20.3217
And you can test my endpoint at https://www.foodie-cloud.org/sparql
Query (with error triggering
POLYGON
) is below.POLYGON((13.463186854291394 50.22782104565781,13.52405965702576 50.22782104571184,13.523373011517947 50.19282422040329,13.464560145307019 50.19194502376654,13.463186854291394 50.22782104565781))
, it worksPOLYGON((13.463186854291394 50.22782104565781,13.52405965702576 50.22782104571184,13.523373011517947 50.18359184367178,13.464560145307019 50.18359184367178,13.463186854291394 50.22782104565781))
it throws errorPOLYGON((13.463186854291394 50.18359184367177761, 13.52405965702576 50.18359184367177761, 13.523373011517947 50.19194502376654, 13.464560145307019 50.19194502376654, 13.463186854291394 50.18359184367177761))
, it worksSo, I cannot understand what is going on here, and is not just about upgrading.
Could you give me some help?
thanks,
Raul
The text was updated successfully, but these errors were encountered: