Hi Fabio,
This should be fixed now. Another case of encoding not implemented for
geometries. I also checked that the others were implemented as well. I
also posted new snapshots for xml-filter and xml-gml2 modules for you to
update.
Let me know if you have any more issues.
-Justin
Fabio Luiz Leite wrote:
> Hi people,
>
> I having troubles with filter encoding of Polygon. In the follwing test,
> It works well:
>
> LineString ln = gf.createLineString (cArray); // Line String works well
> Filter f = ff.contains(ff.property("SERVICEBBOX"), ff.literal(ln));
> Or orFilter = ff.or(filter, f);
> org.geotools.xml.Configuration configuration = new
> org.geotools.filter.v1_0.OGCConfiguration();
> org.geotools.xml.Encoder encoder = new org.geotools.xml.Encoder(
> configuration );
> // create an output stream
> OutputStream xml = new
> FileOutputStream("C:\\eclipse\\workspace\\WebServiceDescriptionTool2\\src\\test\\geoTest4.xml");
>
>
> // encode
> encoder.encode( orFilter, org.geotools.filter.v1_0.OGC.Filter, xml );
>
>
>
> The xml encoding generated is :
>
>
> <ogc:Contains>
> <ogc:PropertyName>SERVICEBBOX</ogc:PropertyName>
> <gml:LineString>
> <gml:coordinates>-38.0,-7.0 -36.0,-7.0</gml:coordinates>
> </gml:LineString>
> </ogc:Contains>
>
> But, when I use Polygon (and I think that I forgetting anything else)
> the geotools not have generated the correct encoding, follows the java code:
>
> Coordinate [] cArray = {c, c2, c3, c4};
> LinearRing ln = gf.createLinearRing(cArray);
> Polygon pol = gf.createPolygon(ln, null);
> Filter f = ff.contains(ff.property ("SERVICEBBOX"), ff.literal(pol));
> Or orFilter = ff.or(filter, f);
> org.geotools.xml.Configuration configuration = new
> org.geotools.filter.v1_0.OGCConfiguration();
> org.geotools.xml.Encoder encoder = new org.geotools.xml.Encoder(
> configuration );
> // create an output stream
> OutputStream xml = new
> FileOutputStream("C:\\eclipse\\workspace\\WebServiceDescriptionTool2\\src\\test\\geoTest4.xml");
>
>
> // encode
> encoder.encode( orFilter, org.geotools.filter.v1_0.OGC.Filter, xml );
>
>
> Follows the xml encoding:
>
> <ogc:Contains>
> <ogc:PropertyName>SERVICEBBOX</ogc:PropertyName>
> <gml:Polygon /> <!-- Polygon isn't well generated -->
> </ogc:Contains>
>
>
> Anyone knows what is wrong ? Or What's happening ?
>
> Thank's in advance !
>
> --
> Fábio Luiz Leite Júnior
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users