Hello Jody,
I create a little Patch which solve my Problems and also keep the "old"
functionality alive.
Perhaps it is possible that you integrate it to the 2.3.x Branch.
Tim
-----Urspr=FCngliche Nachricht-----
Von: Jody Garnett [mailto:jgarnett@...]
Gesendet: Donnerstag, 26. Juli 2007 09:01
An: Tim Englich
Cc: geotools-gt2-users@...
Betreff: Re: [Geotools-gt2-users] NumberValue Problems Using
FilterFilter and GMLFilterDocument
Tim Englich wrote:
> Hello,
>
> I have got problems with parsing the following Filter in GeoTools =
2.3.1
>
> <Filter>
> <PropertyIsEqualTo>
> =09
> <PropertyName>Flurstueckskennzeichen</PropertyName>
> <Literal>1201011010004500000</Literal>
> </PropertyIsEqualTo>
> </Filter>
>
>
> First of all the attribute I apply the Filter on is an String =
attribute.
The
> value I got in the Filter-Object after parsing the XML is an double =
value.
> When I convert the value back to String with the following code
>
> Double d =3D (Double)value;
> DecimalFormat f =3D new
>
DecimalFormat("0.########################################################=
####
> ######");
> valueString =3Df.format(d);
>
> I got back the value 1201011010004499970.
>
> Has anyone an Idea how to solve this Problem?
> =20
I am afraid that 2.3 does not take the attribute type into account when=20
parsing,
upgrading to 2.4 will fix the problem (it leaves everything as a String=20
and the PropertyIsEqualsTo implementation
will convert the values to the same type for comparison).
It is exactly this kind of problem that motivated this work in GeoTools =
2.4.
Jody
|