Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geowave-dev] Wrong number of results with TemporalRange


TemporalRange, even though a public class, is intended as an internally used class.  The query classes are intended to be the public API.  

Please see mil.nga.giat.geowave.examples.query.GeoTemporalQueryExample under the examples sub-project.

Are you using time ranges (start & end) or a single time value in your feature data?  On range data, the default query operator is 'overlaps'.  You can change the operator provided to the query constructor (CompareOperation.CONTAINS). 

What type of index are using, Spatial Temporal?  SpatialTemporalQuery  and TemporalQuery  are only applicable to Spatial Temporal indices.  The alternative is to use a CQL filter with a Spatial index.  The CQL filter is provided to the VectorDataStore.query method in the 'filter' argument.  

The following example demonstrates the creation of an opengis Filter.

 org.geotools.filter.text.cql2.CQL.CQL.toFilter("someTimeVariable during 2005-05-19T20:32:56Z/2005-05-19T21:32:56Z");

What type of query are you using, SpatialTemporalQuery  or TemporalQuery?

Here is an example:

final SpatialTemporalQuery query = new SpatialTemporalQuery(
df.parse("2005-05-17T19:32:56GMT-00:00"),
df.parse("2005-05-17T22:32:56GMT-00:00"),
factory.createPolygon(new Coordinate[] {
new Coordinate(
24,
33),
new Coordinate(
28,
33),
new Coordinate(
28,
37),
new Coordinate(
24,
37),
new Coordinate(
24,
33)
}),
CompareOperation.CONTAINS);





On Thu, Sep 17, 2015 at 1:32 PM, Eric Robertson <rwgdrummer@xxxxxxxxx> wrote:
The TemporalRange(A,A) will not work.

TemporalRange(A1,A2)
A1 = 2015-06-01 00:00:00
A2 = 2015-06-30 23:59:59



On Thu, Sep 17, 2015 at 12:53 PM, Marcel <m.jacob@xxxxxxxxxxx> wrote:
Yeah, I´m using a VectorDataStore. I hope to hear from you soon.
Because my date column stores dates in the form yyyy-MM-dd I tested the following: TemporalRange(A,A) where A contains 2015-06-01 e.g. but not results returned. I´m sure there are some records for first june.

Thanks,
Marcel Jacob.


Am 17.09.2015 18:41, schrieb Eric Robertson:
Just to be sure, you are using VectorDataStore?
The vector data store creates a query filter from the SpatialQuery (query). 

return (CloseableIterator<SimpleFeature>) new AccumuloCqlConstraintsQuery(
adapterIds,
index,
query.getIndexConstraints(index.getIndexStrategy()),
query.createFilters(index.getIndexModel()),
filter,
adapter,
authorizations).query(
accumuloOperations,
adapterStore,
limit);

On Thu, Sep 17, 2015 at 12:38 PM, Eric Robertson <rwgdrummer@xxxxxxxxx> wrote:
The only thing I can come up with with now is timezone concerns.  
There is a bug with respect to CQL filters in 0.8.9.  The fix was was just merged with master today.  I do not think that fix applies to this problem.
I can look into it a bit more tomorrow and see if I can find anything that may be causing an issue.


On Thu, Sep 17, 2015 at 12:08 PM, Derek Yeager <dcy2003@xxxxxxxxx> wrote:

---------- Forwarded message ----------
From: Marcel <m.jacob@xxxxxxxxxxx>
Date: Wed, Sep 16, 2015 at 12:05 PM
Subject: [geowave-dev] Wrong number of results with TemporalRange
To: geowave-dev@xxxxxxxxxxxxxxxx


Hello again,
I wrote a query containing a TemporalRange() from 2015-06-01 00:00:00 til 2015-06-07 23:59:59 and getting 11796 results. Now I wrote the same query with PostGIS and the number of results are 11743. Looking at the results in detail it seems that records from 2015-06-08 were found in the GeoWave-query. Is there something unintuitive when using TemporalRanges? I assume start- and endtime were included in my range. I´m using jodatime for parsing my strings into dates. GeoWave version is 0.8.9-SNAPSHOT.

Thanks,
Marcel Jacob.
_______________________________________________
geowave-dev mailing list
geowave-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/geowave-dev







Back to the top