Hi Adnan,
At the minute, GeoMesa has a single, geo-time index. In broad
strokes, if you can provide a range for both space and time, your
query will be faster than those with only space bounds or time
bounds. Currently, attribute-only queries scan the entire table and
check against each entry. Depending on your volume of data, this is
either slow or pointless. We will be introducing secondary indexes
which will make some of these queries possible/fast.
The filter you mentioned doesn't get parsed as a spatial filter; it
looks like it ends up being an
org.opengis.filter.PropertyIsEqualTo. If you need to do something
like this where you need to look up if a particular geometry is
stored exactly, I do have a suggestion.
First, pick one of the points, buffer it by a small distance, and
then use that buffered geometry with the intersects predicate...
e.g.,
INTERSECTS(geomesa_index_geometry, POLYGON ((30.5 10.5, 29.5 10.5,
29.5 9.5, 29.5 10.5, 30.5 10.5))) AND geomesa_index_geometry =
'LINESTRING (30 10, 10 30, 40 40)'
(By the way, double-check the name of your geometry field; it may be
geomesa_index_geometry.)
Anyhow, that should help your query performance in this particular
case.
Cheers,
Jim
On 06/19/2014 08:57 AM, Adnan Yaqoob
wrote:
Thanks Jim for the reply, I was using id field to
identify feature then I tried your method and it is working but
I have another question, would it effect query performance if I
use attribute value search because then geospatial indexing of
geomesa won't be used.
Will following query use geospatial indexing or not:
ECQL.toFilter("geom = 'LINESTRING
(30 10, 10 30, 40 40)'" )
here geom is default Geometry field.
Regards,
Adnan
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
http://www.locationtech.org/mailman/listinfo/geomesa-users
|