--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+unsubscribe@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+unsubscribe@clarkparsia.com.
You received this message because you are subscribed to a topic in the Google Groups "Stardog" group.
To unsubscribe from this topic, visit https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stardog+unsubscribe@clarkparsia.com.
Nieuwe Plantage 54-55
2611XK Delft
+31 (0)70 7640725
1 Fore Street
EC2Y 9DT London
+44 (0)20 37690760
Hi Zachary, it does not work.This is the actual query I run. The same you proposed.prefix geo: <http://www.opengis.net/ont/geosparql#>prefix gn: <http://geonames.org/ontology#>prefix sf: <http://www.opengis.net/def/sf/>prefix g: <http://geophy.com/>prefix geof: <http://www.opengis.net/def/function/geosparql/>prefix ws: <http://www.w3.org/2003/01/geo/wgs84_pos#>SELECT * WHERE { ?g geo:asWKT ?gWKT . FILTER (geof:within(?g, "POLYGON((-99.872246 32.304972,-99.872246 32.504972,-99.672246 32.504972,-99.672246 32.304972,-99.872246 32.304972))"^^geo:wktLiteral)) }Surprisingly, if I enable inference then nothing is returned. Very strange behavior!Best,
Looks like I missed a comm between the arguments. Can you try it again with the comma belowSELECT * WHERE { ?g, geo:asWKT ?gWKT . FILTER (geof:within(?g, "POLYGON((-99.872246 32.304972,-99.872246 32.504972,-99.672246 32.504972,-99.672246 32.304972,-99.872246 32.304972))"^^geo:wktLiteral)) }
On Thu, Dec 15, 2016 at 11:15 AM, Samur Araujo <s.ar...@geophy.com> wrote:
Hi Zachary, it does not work.This is the actual query I run. The same you proposed.prefix geo: <http://www.opengis.net/ont/geosparql#>prefix gn: <http://geonames.org/ontology#>prefix sf: <http://www.opengis.net/def/sf/>prefix g: <http://geophy.com/>prefix geof: <http://www.opengis.net/def/function/geosparql/>prefix ws: <http://www.w3.org/2003/01/geo/wgs84_pos#>SELECT * WHERE { ?g geo:asWKT ?gWKT . FILTER (geof:within(?g, "POLYGON((-99.872246 32.304972,-99.872246 32.504972,-99.672246 32.504972,-99.672246 32.304972,-99.872246 32.304972))"^^geo:wktLiteral)) }Surprisingly, if I enable inference then nothing is returned. Very strange behavior!Best,
Looks like I missed a comm between the arguments. Can you try it again with the comma belowSELECT * WHERE { ?g, geo:asWKT ?gWKT . FILTER (geof:within(?g, "POLYGON((-99.872246 32.304972,-99.872246 32.504972,-99.672246 32.504972,-99.672246 32.304972,-99.872246 32.304972))"^^geo:wktLiteral)) }
On Thu, Dec 15, 2016 at 11:15 AM, Samur Araujo <s.ar...@geophy.com> wrote:
Hi Zachary, it does not work.This is the actual query I run. The same you proposed.prefix geo: <http://www.opengis.net/ont/geosparql#>prefix gn: <http://geonames.org/ontology#>prefix sf: <http://www.opengis.net/def/sf/>prefix g: <http://geophy.com/>prefix geof: <http://www.opengis.net/def/function/geosparql/>prefix ws: <http://www.w3.org/2003/01/geo/wgs84_pos#>SELECT * WHERE { ?g geo:asWKT ?gWKT . FILTER (geof:within(?g, "POLYGON((-99.872246 32.304972,-99.872246 32.504972,-99.672246 32.504972,-99.672246 32.304972,-99.872246 32.304972))"^^geo:wktLiteral)) }Surprisingly, if I enable inference then nothing is returned. Very strange behavior!Best,
Hi Samur,
I believe we have tracked down the bug that you are experiencing with geof:within inside a filter. I have created internal ticket #3373 to address it.
For now, try executing the following steps as a workaround:
stardog-admin db offline myDb
stardog-admin metadata set query.plan.reuse=never -- myDb
stardog-admin db online myDb
<Restart stardog>
Let me know if this works!
Cheers,
Stephen
On 12/15/16 11:15, Samur Araujo wrote:
Hi Zachary, it does not work.This is the actual query I run. The same you proposed.
prefix geo: <http://www.opengis.net/ont/geosparql#>prefix gn: <http://geonames.org/ontology#>prefix sf: <http://www.opengis.net/def/sf/>prefix g: <http://geophy.com/>prefix geof: <http://www.opengis.net/def/function/geosparql/>
prefix ws: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT * WHERE { ?g geo:asWKT ?gWKT . FILTER (geof:within(?g, "POLYGON((-99.872246 32.304972,-99.872246 32.504972,-99.672246 32.504972,-99.672246 32.304972,-99.872246 32.304972))"^^geo:wktLiteral)) }
Surprisingly, if I enable inference then nothing is returned. Very strange behavior!
Best,
Hi Stephen, I am running the same query now on top of geonames.PREFIX geo: <http://www.opengis.net/ont/geosparql#>PREFIX geof: <http://www.opengis.net/def/function/geosparql/>SELECT * WHERE {?g geo:asWKT ?gWKT .FILTER (geof:within(?g, "POLYGON((-99.8 32.3,-99.8 32.5,-99.6 32.5,-99.6 32.3,-99.8 32.3))"^^geo:wktLiteral )) .}The polygon is not very large, around 10 KM2.The selection should not take long but the queries just take hours to execute.
Could you please explain us why it is so slow? Are you using any R-tree index under stardog?
Could you detail this architecture so we can understand what to expect from stardog on this query, w.r.t. performance.Best,SamurP.S below is the query plan. I do not see any r-tree access.
Samur,On Fri, Dec 16, 2016 at 10:42 AM, Samur Araujo <s.ar...@geophy.com> wrote:Hi Stephen, I am running the same query now on top of geonames.PREFIX geo: <http://www.opengis.net/ont/geosparql#>PREFIX geof: <http://www.opengis.net/def/function/geosparql/>SELECT * WHERE {?g geo:asWKT ?gWKT .FILTER (geof:within(?g, "POLYGON((-99.8 32.3,-99.8 32.5,-99.6 32.5,-99.6 32.3,-99.8 32.3))"^^geo:wktLiteral )) .}The polygon is not very large, around 10 KM2.The selection should not take long but the queries just take hours to execute.Your query is basically asking “for all known shapes, see if they are within this given shape". As the cardinality of the scan indicates, that's 2.2M shapes. If we can do those checks in 1ms, that's still 2,200s to execute.In your *specific* case, we could inline the `?g geo:asWKT ?gWKT .` directly into `within` and rely on the spatial index to list the points within the given shape, that would be faster. But generally, we cannot.
Consider if you had an additional BGP `?g foaf:name "Shopping Mall"`. Additional information about the spatial structures are not stored in the spatial index and must be handled external to lookups in the spatial index. This how the evaluation works in general; we use the rest of the query to narrow down the shapes that are passed to the spatial function when its input is a variable. Since your query doesn't narrow down the list of shapes at all, we have to check all of them.
We'll investigate more sophisticated optimization techniques for spatial queries, #3377.In the meantime, you should consider restricting your queries a bit more.
Could you please explain us why it is so slow? Are you using any R-tree index under stardog?For the spatial index, we're using Lucene Spatial, which relies on spatial4j, and optionally, as you know, integrates with JTS.This post [1] is mentioned in the Lucene spatial documentation.Could you detail this architecture so we can understand what to expect from stardog on this query, w.r.t. performance.Best,SamurP.S below is the query plan. I do not see any r-tree access.The `Within` operator is calling out to the spatial index.
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Stardog" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to stardog+unsubscribe@clarkparsia.com.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> -- --
>>>>>> You received this message because you are subscribed to the C&P
>>>>>> "Stardog" group.
>>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>>> To unsubscribe from this group, send email to
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>> ---
>>>>>> You received this message because you are subscribed to a topic in the
>>>>>> Google Groups "Stardog" group.
>>>>>> To unsubscribe from this topic, visit
>>>>>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Senior Data Scientist
>>>>> Geophy
>>>>> www.geophy.com
>>>>>
>>>>> Nieuwe Plantage 54-55
>>>>> 2611XK Delft
>>>>> +31 (0)70 7640725
>>>>>
>>>>> 1 Fore Street
>>>>> EC2Y 9DT London
>>>>> +44 (0)20 37690760
>>>>>
>>>>> --
>>>>> -- --
>>>>> You received this message because you are subscribed to the C&P
>>>>> "Stardog" group.
>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>> To unsubscribe from this group, send email to
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>
>>>>>
>>>>> --
>>>>> -- --
>>>>> You received this message because you are subscribed to the C&P
>>>>> "Stardog" group.
>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>> To unsubscribe from this group, send email to
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>> ---
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "Stardog" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>> For more options, visit this group at
>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>
>>
>> --
>> -- --
>> You received this message because you are subscribed to the C&P "Stardog"
>> group.
>> To post to this group, send email to sta...@clarkparsia.com
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Stardog" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>
>
>
>
> --
> Senior Data Scientist
> Geophy
> www.geophy.com
>
> Nieuwe Plantage 54-55
> 2611XK Delft
> +31 (0)70 7640725
>
> 1 Fore Street
> EC2Y 9DT London
> +44 (0)20 37690760
>
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Stardog" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to stardog+unsubscribe@clarkparsia.com.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> -- --
>>>>>> You received this message because you are subscribed to the C&P
>>>>>> "Stardog" group.
>>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>>> To unsubscribe from this group, send email to
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>> ---
>>>>>> You received this message because you are subscribed to a topic in the
>>>>>> Google Groups "Stardog" group.
>>>>>> To unsubscribe from this topic, visit
>>>>>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Senior Data Scientist
>>>>> Geophy
>>>>> www.geophy.com
>>>>>
>>>>> Nieuwe Plantage 54-55
>>>>> 2611XK Delft
>>>>> +31 (0)70 7640725
>>>>>
>>>>> 1 Fore Street
>>>>> EC2Y 9DT London
>>>>> +44 (0)20 37690760
>>>>>
>>>>> --
>>>>> -- --
>>>>> You received this message because you are subscribed to the C&P
>>>>> "Stardog" group.
>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>> To unsubscribe from this group, send email to
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>
>>>>>
>>>>> --
>>>>> -- --
>>>>> You received this message because you are subscribed to the C&P
>>>>> "Stardog" group.
>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>> To unsubscribe from this group, send email to
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>> ---
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "Stardog" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>> For more options, visit this group at
>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>
>>
>> --
>> -- --
>> You received this message because you are subscribed to the C&P "Stardog"
>> group.
>> To post to this group, send email to sta...@clarkparsia.com
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Stardog" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>
>
>
>
> --
> Senior Data Scientist
> Geophy
> www.geophy.com
>
> Nieuwe Plantage 54-55
> 2611XK Delft
> +31 (0)70 7640725
>
> 1 Fore Street
> EC2Y 9DT London
> +44 (0)20 37690760
>
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Stardog" group.
To unsubscribe from this topic, visit https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stardog+unsubscribe@clarkparsia.com.
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Stardog" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to stardog+unsubscribe@clarkparsia.com.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> -- --
>>>>>> You received this message because you are subscribed to the C&P
>>>>>> "Stardog" group.
>>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>>> To unsubscribe from this group, send email to
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>> ---
>>>>>> You received this message because you are subscribed to a topic in the
>>>>>> Google Groups "Stardog" group.
>>>>>> To unsubscribe from this topic, visit
>>>>>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Senior Data Scientist
>>>>> Geophy
>>>>> www.geophy.com
>>>>>
>>>>> Nieuwe Plantage 54-55
>>>>> 2611XK Delft
>>>>> +31 (0)70 7640725
>>>>>
>>>>> 1 Fore Street
>>>>> EC2Y 9DT London
>>>>> +44 (0)20 37690760
>>>>>
>>>>> --
>>>>> -- --
>>>>> You received this message because you are subscribed to the C&P
>>>>> "Stardog" group.
>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>> To unsubscribe from this group, send email to
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>
>>>>>
>>>>> --
>>>>> -- --
>>>>> You received this message because you are subscribed to the C&P
>>>>> "Stardog" group.
>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>> To unsubscribe from this group, send email to
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>> ---
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "Stardog" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>> For more options, visit this group at
>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>
>>
>> --
>> -- --
>> You received this message because you are subscribed to the C&P "Stardog"
>> group.
>> To post to this group, send email to sta...@clarkparsia.com
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Stardog" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>
>
>
>
> --
> Senior Data Scientist
> Geophy
> www.geophy.com
>
> Nieuwe Plantage 54-55
> 2611XK Delft
> +31 (0)70 7640725
>
> 1 Fore Street
> EC2Y 9DT London
> +44 (0)20 37690760
>
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Stardog" group.
To unsubscribe from this topic, visit https://groups.google.com/a/clarkparsia.com/d/topic/stardog/4hEmgeixjaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stardog+unsubscribe@clarkparsia.com.
Cheers,
Stephen