Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[geomesa-users] Problem creating OR filter with disjoint geometries

All,

I occasionally have the need to perform a GeoMesa query against multiple disjoint regions in space.  

Currently, I am able to query successfully if I perform separate queries for each region, but just today I attempted to do a single query by OR'ing two geometries together and I ended up getting back results that were not in either of my two geometries.  I am not sure if this is a bug, a limitation, or if I am doing something wrong.

Here is my code:
	...
	FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
	Filter filter = ff.or(Arrays.asList(geographyfilter1, geographyfilter2));
	Query query = new Query(simpleFeatureTypeName, filter);
	...

My code compiles and executes as if nothing is wrong, but the query results are not what I expect, because I get back results that do not appear when I perform separate queries for geographyfilter1 and geographyfilter2.

Is there a way I can perform such a query as a single query?

Thanks,

Beau









Back to the top