Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Feature writing issue...

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


On Wed, Jun 18, 2014 at 6:05 PM, Jim Hughes <jnh5y@xxxxxxxx> wrote:
Hi Adnan,

Great question!  Geomesa uses the feature id as a unique identifier.  It sounds like you might using the id field to identify/name a thing which is moving/changing shape/varying attributes through time.  If that's the use case, I'd suggest putting that information which identifies the object into a different field like 'name' or 'identifier'. 

As for documentation, I'd suggest checking out http://geomesa.github.io/ and looking through the tutorials.  We've integrated with GeoTools, so I'd also point to their documentation about DataStores/FeatureStores (http://docs.geotools.org/latest/userguide/library/api/datastore.html and http://docs.geotools.org/stable/userguide/library/data/featuresource.html).*

Let us know what others questions we can help with,

Jim

* In particular, I believe that you would see the same behavior with (most) other GeoTools FeatureStores. 

On 06/18/2014 06:14 AM, Adnan Yaqoob wrote:
Hello Everybody,

I am new to Geomesa and trying its API. I have a question, how can I store features with same id and geometry with different time stamp and attributes values. I tried to write feature with same id with different attributes and it was overwriting previous feature. I am stuck on this point, please help me understand. 

Is there any documentation for Geomesa API?

Regards,
Adnan


_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
http://www.locationtech.org/mailman/listinfo/geomesa-users


_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
http://www.locationtech.org/mailman/listinfo/geomesa-users




_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
http://www.locationtech.org/mailman/listinfo/geomesa-users


Back to the top