You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Raja <ye...@gmail.com> on 2017/01/27 17:03:00 UTC
Geo Spatial queries
Hi,
I have been using Ignite to store Geo Spatial data, index it and query it.
Till now my need was only to query the data by a bounding box and Ignite has
been great for that type of need.
Please see the link below for example of bounding box query
https://www.gridgain.com/resources/blog/geospatial-queries-apache-ignite
<https://www.gridgain.com/resources/blog/geospatial-queries-apache-ignite>
Now I want to query the spatial data within a given radius of a geometry and
many other ways
Please see below for functions/methods PostGIS supports out of the box to
query spatial data
http://postgis.net/docs/reference.html
<http://postgis.net/docs/reference.html>
Wonder if ignite supports other ways of querying spatial data other than by
bounding box.
Appreciate if you can provide me a link to documentation or samples which
helps to understand different ways to query spatial data.
Thanking you
Raja
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Geo-Spatial-queries-tp10291.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Geo Spatial queries
Posted by Raja <ye...@gmail.com>.
Sergi,
Thanks again. The approach you suggested worked like a charm.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Geo-Spatial-queries-tp10291p10364.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Geo Spatial queries
Posted by Raja <ye...@gmail.com>.
Sergi,
Wonderful. Thanks for pointing me in the right direction. I wasn't aware of
QuerySqlFunction. Thanks again.
Will try this approach and will reply with my findings.
Raja
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Geo-Spatial-queries-tp10291p10313.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Geo Spatial queries
Posted by Sergi Vladykin <se...@gmail.com>.
Hi,
The only way to perform effective search with spatial index is searching
for intersection of bounding boxes. Thus most probably you will need to
apply a two step approach:
1. Find everything by bounding box intersection for a fast rough search
over index.
2. Filter the result with exact matching function.
For example:
SELECT ...
FROM my_table t
WHERE t.coord && ?
AND my_search_predicate( t.coord , ? )
Where `my_search_predicate` is your custom function [1] which in turn will
utilize all the available geospatial API of JTS Suite [2].
[1]
https://ignite.apache.org/releases/1.8.0/javadoc/org/apache/ignite/cache/query/annotations/QuerySqlFunction.html
[2]
https://github.com/locationtech/jts/blob/master/doc/JTS%20Developer%20Guide.pdf
Sergi
2017-01-27 20:03 GMT+03:00 Raja <ye...@gmail.com>:
> Hi,
>
> I have been using Ignite to store Geo Spatial data, index it and query it.
>
> Till now my need was only to query the data by a bounding box and Ignite
> has
> been great for that type of need.
>
> Please see the link below for example of bounding box query
>
> https://www.gridgain.com/resources/blog/geospatial-queries-apache-ignite
> <https://www.gridgain.com/resources/blog/geospatial-queries-apache-ignite>
>
> Now I want to query the spatial data within a given radius of a geometry
> and
> many other ways
>
> Please see below for functions/methods PostGIS supports out of the box to
> query spatial data
>
> http://postgis.net/docs/reference.html
> <http://postgis.net/docs/reference.html>
>
> Wonder if ignite supports other ways of querying spatial data other than by
> bounding box.
>
> Appreciate if you can provide me a link to documentation or samples which
> helps to understand different ways to query spatial data.
>
> Thanking you
> Raja
>
>
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Geo-Spatial-queries-tp10291.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>