Hi,
This test proves so far only that the CQL filter with ">(x+y)/2" filter works with the topp:states data coming from a shapefile datastore. Do your data come also from a shapefile? If not, have another try by converting your data into shapefile and making a new layer from that. That way you can check if the difference comes from datastores, for example shapefile vs. PostGIS.
If your data is in shapefile, start from the scratch and copy a few features from your data into a new shapefile and check if that works. If not, rip off all other attributes than geometry and the one you use in the filter. If still no success, edit the minimal shapefile with OpenJUMP or QGIS, delete the attribute values and rewrite them by hand. This may reveal if there is some odd data error in the shapefile. If still no success, it starts to feel like a bug and you can zip the problematic small shapefile and put it somewhere where developers can download it.
-Jukka Rahkonen-
________________________________
venky wrote:
Hi Rahkonen,
Thanks for nice response. I tried your example and I got the perfect output but there is no change in my dataset.
So problem is only in my dataset.
On Sun, Dec 29, 2013 at 10:38 PM, Rahkonen Jukka <jukka.rahkonen@anonymised.com<mailto:jukka.rahkonen@anonymised.com>> wrote:
Hi,
If possible, test with some data that we others can also use easily. Trying with another dataset removes also the possibility that there is something special in your own data. In this case the famous topp:states feels suitable.
http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=topp:states&cql_filter=WATER_KM>6000
Result=OK, have a next try with 2000+4000 instead of 6000
http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=topp:states&propertyname=STATE_NAME,WATER_KM&cql_filter=WATER_KM>\(2000\.00\+4000\.00\)
Result=Error, let's change '+' into '%2B'
http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=topp:states&propertyname=STATE_NAME,WATER_KM&cql_filter=WATER_KM>\(2000\.00%2B4000\.00\)
Result=OK, improve formula into (2000+4000)/2
http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=topp:states&propertyname=STATE_NAME,WATER_KM&cql_filter=WATER_KM>\(2000\.00%2B4000\.00\)/2
Result=OK
Perhaps the reason for the remaining trouble is the extra space characters in your formula: '2000 + 4000' instead of '2000+4000'.
-Jukka Rahkonen-
________________________________
venky wrote:
Hi Mauro,
Thanks for your reply. I tried as per your instruction but got the same result. plz the generated url
Query is: Area > (41.9696 + 42.9826) / 2
http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=Plymouth_Buildings&cql_filter=Area%20>%20(41.9696%20+%2B+%2042.9826)%20/%202
Is there anything I did wrongly? Kindly help me plz
On Sat, Dec 28, 2013 at 1:59 PM, Mauro Bartolomeoli <mauro.bartolomeoli@anonymised.com1107...<mailto:mauro.bartolomeoli@anonymised.com><mailto:mauro.bartolomeoli@anonymised.com1107...<mailto:mauro.bartolomeoli@anonymised.com>>> wrote:
Hi venky,
2013/12/24 venky <venky.src@anonymised.com<mailto:venky.src@anonymised.com><mailto:venky.src@anonymised.com>>
Hi Mauro,
All is fine now. But below thing is not returning correct result. Is there anything wrong in that?
Area
-------
41.9696
42.9826
43.0137
43.6441
46.8394
46.9315
47.2082
781.198
Area > ('41.9696' + '42.9826') / 2
Its filtered out only 1 feature,Its Area 781.198
Please, try removing quotes around the numeric values in your filter. Quotes are used for string literal values, and I presume that using sum with quoted strings you get concatenation of strings and not arithmetic sum.
Your filter should be: Area > (41.9696 + 42.9826) / 2
Regards,
Mauro Bartolomeoli
--
== GeoSolutions will be closed for Christmas Holidays from 23/12/2013 to 06/01/2014 ==
Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@anonymised.comrge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users