Trully sorry about that. I think i saw them reversed somewhere and thought should be reversed in the cqlfilter too. Now is working great :)
The only relation I'm missing is the 'isWithinDistance', do you know if works? When running with it I'm getting this exception
org.geotools.filter.text.cql2.CQLException: Encountered "POINT" at line 1, column 28.
Was expecting one of:
<STRING_LITERAL> ...
"true" ...
"false" ...
"(" ...
"[" ...
<INTEGER_LITERAL> ...
<FLOATING_LITERAL> ...
<IDENTIFIER> ...
Parsing : isWithinDistance(geometry, POINT (-25.88987361,-49.88764954), 1000.0).
at org.geotools.filter.text.cql2.CQLCompiler.compileFilter(CQLCompiler.java:106)
at org.geotools.filter.text.commons.CompilerUtil.parseFilter(CompilerUtil.java:196)
at org.geotools.filter.text.cql2.CQL.toFilter(CQL.java:134)
at org.geotools.filter.text.cql2.CQL.toFilter(CQL.java:113)
at mil.nga.giat.geowave.adapter.vector.query.cql.CQLQuery.<init>(CQLQuery.java:64)
at mil.nga.giat.geowave.adapter.vector.query.cql.CQLQuery.<init>(CQLQuery.java:53)
Thanks!
De: geowave-dev-bounces@xxxxxxxxxxxxxxxx <geowave-dev-bounces@xxxxxxxxxxxxxxxx> en nombre de Eric Robertson <rwgdrummer@xxxxxxxxx>
Enviado: lunes, 29 de febrero de 2016 04:23 p.m.
Para: geowave-dev
Asunto: Re: [geowave-dev] SpatialQuery CompareOperations
Any reason you flipped latitude/longitude?
CONTAINS does as you say: test to see if the geometry stored by GeoWave contains the provide geometry
WITHIN tests to see if the geometry stored by GeoWave is within the provided geometry (which we can assume is some valid polygon for the simple case).
Here is an example of Within i had used recently:
WITHIN(geom,POLYGON((-122.76470055844142 0.4979, -122.76474089862228 0.4974904192702817, -122.76486036891433 0.4970965784983109, -122.76505437814123 0.4967336127640861, -122.76531547063722 0.4964154706372199, -122.76563361276409 0.4961543781412318, -122.76599657849832
0.49596036891432, -122.76639041927028 0.4958408986222733, -122.7668 0.4958005584414154, -122.76720958072973 0.4958408986222733, -122.76760342150169 0.49596036891432, -122.76796638723592 0.4961543781412318, -122.76828452936279 0.4964154706372199, -122.76854562185878
0.4967336127640861, -122.76873963108568 0.4970965784983109, -122.76885910137773 0.4974904192702817, -122.76889944155859 0.4979, -122.76885910137773 0.4983095807297183, -122.76873963108568 0.4987034215016891, -122.76854562185878 0.499066387235914, -122.76828452936279
0.4993845293627801, -122.76796638723592 0.4996456218587683, -122.76760342150169 0.49983963108568, -122.76720958072973 0.4999591013777267, -122.7668 0.4999994415585847, -122.76639041927028 0.4999591013777267, -122.76599657849832 0.49983963108568, -122.76563361276409
0.4996456218587683, -122.76531547063722 0.4993845293627801, -122.76505437814123 0.499066387235914, -122.76486036891433 0.4987034215016891, -122.76474089862228 0.4983095807297183, -122.76470055844142 0.4979)))
|