Oliver, > On 4 Nov 2014, at 14:11, Olivier Dalang <[email protected]> wrote: > > Hi, > > I tested this right now on today's Version 7.1.1-dev.3211-pthreads as of Nov > 4 2014 (051e91d2029a3e90a854539ed83c30e889460847) > > I'm not really sure about what's happening, my data set is a bit complex and > I've trouble finding which feature exactly cause some problems. When trying > to reproduce the error, I ran into the problem even with normal polygons. It > seems it's more depending on the coordinates than on the type of shapes. > > Here's the query : > > PREFIX geo: <http://www.opengis.net/ont/geosparql#> > PREFIX : <http://test/#> > > SELECT ?subject ?geom > FROM <http://test/> > WHERE { > ?subject geo:geometry ?geom . > FILTER( bif:st_intersects ( ?geom, bif:st_geomfromtext("BOX(12.31 > 45.41, 12.38 45.48)") ) ) > } > > It works with this data : > > PREFIX geo: <http://www.opengis.net/ont/geosparql#> > PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> > PREFIX : <http://test/#> > INSERT DATA{ > GRAPH <http://test/> { > :data0 geo:geometry "POINT(12.332352 > 45.439447)"^^virtrdf:Geometry . > } > } > > It doesn't work with this data (I get the "Virtuoso 42000 Error GEO..: for > after check of geo intersects, some shape types (e.g., polygon rings and > curves) are not yet supported" error when using the select query above). Note > that if I change the BOX in the select query so that it doesn't intersect the > data, I get no error (and of course no result) > > ... > :data1 geo:geometry "POLYGON((12.332352 45.439447,12.332362 > 45.439456,12.332305 45.439457,12.332339 45.439436,12.332352 > 45.439447))"^^virtrdf:Geometry . > ... > >
[Hugh] What is the actual “select ..” query you are running, please provide
actual queries so no assumptions are being made. I assume the insert query is:
SPARQL PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX
virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> PREFIX : <http://test/#>
INSERT DATA{ GRAPH <http://test/> { :data2 geo:geometry "POLYGON((0 0,0
1,1 1,1 0,0 0))"^^virtrdf:Geometry . }};
but the select query is unclear to me ???
> The strange thing is that I get no error with this data even when the BOX
> intersects the polygon in the SELECT query ("BOX(-1 -1,1 1)"), even if it's
> the same type of geometry.
>
> ...
> :data2 geo:geometry "POLYGON((0 0,0 1,1 1,1 0,0
> 0))"^^virtrdf:Geometry .
> ...
>
>
> While testing, I ran into another family of queries where I get the same
> error.
>
> This query works properly (intersection1 is true and intersection2 is false) :
>
> SELECT
> ( bif:st_intersects( bif:st_geomfromtext("POLYGON((0 0,0 10,10
> 10,10 0,0 0))"), bif:st_geomfromtext("POLYGON((0 0,0 5,5 5,5 0,0 0))") ) as
> ?intersection_test_1 )
> ( bif:st_intersects( bif:st_geomfromtext("POLYGON((0 0,0 10,10
> 10,10 0,0 0))"), bif:st_geomfromtext("POLYGON((20 20,20 25,25 25,25 20,20
> 20))") ) as ?intersection_test_2 )
> WHERE{
> }
[Hugh] I can recreate the error running this query:
SQL> SPARQL SELECT ( bif:st_intersects( bif:st_geomfromtext("POLYGON((0 0,0
10,10 10,10 0,0 0))"), bif:st_geomfromtext("BOX(0 0,5 5)") ) as
?intersection_test_1 ) ( bif:st_intersects( bif:st_geomfromtext("POLYGON((0
0,0 10,10 10,10 0,0 0))"), bif:st_geomfromtext("BOX(20 20,25 25)") ) as
?intersection_test_2 ) WHERE{ };
*** Error 42000: VD [Virtuoso Server]GEO..: for after check of geo intersects,
some shape types (e.g., polygon rings and curves) are not yet supported
at line 40 of Top-Level:
SPARQL SELECT ( bif:st_intersects( bif:st_geomfromtext("POLYGON((0 0,0 10,10
10,10 0,0 0))"), bif:st_geomfromtext("BOX(0 0,5 5)") ) as ?intersection_test_1
) ( bif:st_intersects( bif:st_geomfromtext("POLYGON((0 0,0 10,10 10,10 0,0
0))"), bif:st_geomfromtext("BOX(20 20,25 25)") ) as ?intersection_test_2 )
WHERE{ }
SQL>
So we have something to look into for this query form as “polygons” are
supported, as in the online examples at:
http://virtuoso.openlinksw.com/tutorials/sparql/SPARQL_Tutorials_Part_10/SPARQL_Tutorials_Part_10.html#(1)
Regards
Hugh
>
> This other query doesn't work (same error as above), but it's identical from
> a geometric point of view :
>
> SELECT
> ( bif:st_intersects( bif:st_geomfromtext("POLYGON((0 0,0 10,10
> 10,10 0,0 0))"), bif:st_geomfromtext("BOX(0 0,5 5)") ) as
> ?intersection_test_1 )
> ( bif:st_intersects( bif:st_geomfromtext("POLYGON((0 0,0 10,10
> 10,10 0,0 0))"), bif:st_geomfromtext("BOX(20 20,25 25)") ) as
> ?intersection_test_2 )
> WHERE{
>
> }
>
>
> Can you confirm the issues ?
> I got quite confused with all those queries/testing...
>
> Best regards,
>
> Olivier
>
>
> 2014-11-04 3:03 GMT+01:00 Hugh Williams <[email protected]>:
> Hi Oliver,
>
> Are you able to provide a sample dataset and query to demonstrate the error
> being encountered. Also confirm the Virtuoso version being used (virtuoso-t
> -?) or which git archive you have built against ?
>
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc. // http://www.openlinksw.com/
> Weblog -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter -- http://twitter.com/OpenLink
> Google+ -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
>
>> On 3 Nov 2014, at 12:08, Olivier Dalang <[email protected]> wrote:
>>
>> Hi !
>>
>> The bif:ST_Intersects function throws an error when used on some type of
>> shapes. Here's the error message :
>>
>> GEO..: for after check of geo intersects, some shape types (e.g., polygon
>> rings and curves) are not yet supported" on query...
>>
>> It indeed happens when working on polygons with inner rings.
>>
>>
>> Here, I'm using the ST_Intersect function to filter returned features to my
>> map bounding frame:
>>
>> FILTER (
>> bif:st_intersects ( ?geom, bif:st_geomfromtext("BOX({{xmin}} {{ymin}},
>> {{xmax}} {{ymax}})") )
>> )
>>
>> I'm almost sure this used to work some weeks ago or at least did not return
>> errors (probably it silently ignored inner rings ?).
>>
>> In my case, I don't really mind about inner rings, I'd actually be happy
>> with a bif:st_mbb_intersect function (mbb for minimum bounding box), which
>> would even be lighter to compute. Is there such a function ? Or a function
>> to return the bounding box of a geometry ?
>> Or is there a way to make bif:st_intersects work again on all types of
>> shapes ?
>>
>> Thanks in advance for your help !
>>
>>
>> Olivier Dalang
>> ---
>> Digital Humanities Lab (DHLAB) - http://dhlab.epfl.ch
>> EPFL CDH DHLAB / CM 2 271
>> Station 10 / CH-1015 Lausanne
>> Tel. +41 21 693 02 46
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Virtuoso-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------
_______________________________________________ Virtuoso-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/virtuoso-users
