You're right. The column in PostGIS is numeric(10,0) so it is an Integer.
However, GeoServer detects it just as a BigDecimal (that's what the admin
interface says in the layer configuration) and that's why I was using a
non-integer representation to generate the Filter.

Anyway, it's odd that Geoserver behaves differently for PropertyIsNotEqualTo
and PropertyIsEqualTo.

I don't know if this problem shows up when using a scale different than
zero. But I think this is enough to continue with my work...

Thanks

2011/2/11 Justin Deoliveira <jdeol...@opengeo.org>

> What is the type of the area attribute? GeoServer does not do a straight
> string comparison. It attempts to convert the value according of the type of
> the attribute. I have seen this case where the attribute type is an integer
> and the value is a double specified in this way. So even though 530 ==530.0
> the comparison fails.
>
> On Fri, Feb 11, 2011 at 8:16 AM, Fernando Barbat <fbar...@gmail.com>wrote:
>
>> Hi,
>>
>> I'm using GeoServer 2.0.2. I want to use a PropertyIsNotEqualTo in SLD
>> referring to Double field. If the literal is an integer value -it ends with
>> ".0"-, the comparison always returns false. Geoserver is probably using a
>> String comparison instead of a Double comparison. This problem doesn't shows
>> up with PropertyIsEqualTo.
>>
>> This does NOT work.
>>
>> <ogc:PropertyIsNotEqualTo>
>>   <ogc:PropertyName>area</ogc:PropertyName>
>>   <ogc:Literal>530.0</ogc:Literal>
>> </ogc:PropertyIsNotEqualTo>
>>
>> This work:
>>
>> <ogc:PropertyIsNotEqualTo>
>>   <ogc:PropertyName>area</ogc:PropertyName>
>>   <ogc:Literal>530</ogc:Literal>
>> </ogc:PropertyIsNotEqualTo>
>>
>> Any idea?
>>
>> Thanks.
>>
>>
>> ------------------------------------------------------------------------------
>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>> Pinpoint memory and threading errors before they happen.
>> Find and fix more than 250 security defects in the development cycle.
>> Locate bottlenecks in serial and parallel code that limit performance.
>> http://p.sf.net/sfu/intel-dev2devfeb
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to