Your code looks fine; you have commit access so go ahead and use it 
(usual advice about writing a test case blah blah blah).
I also would expect a gml:BOX element to be generated; we should check 
on geotools-devel to see if any code is expecting a gml:Polygon (and if 
so ask them why).

The only thing I can think of is that this code (on trunk) used to be 
writeBounds( Envelope ) and it was changed to BoundingBox during the 
recent code sprint.

Cheers,
Jody
> Hello Jody,
>
> I write you this Email because I found an issue in
> FeatureTranslator.writeBounds on trunk.
>
> The code should write a gml:BOX element but it writes an gml:Polygon.
> I think this is wrong.
>
> Here is the code I implemented to fix this issue.
>
>         public void writeBounds(BoundingBox bounds) {
>             try {
>                 String boundedBy = geometryTranslator.getDefaultPrefix() +
> ":"
>                     + "boundedBy";
>                
>                 contentHandler.startElement("", "", boundedBy, NULL_ATTS);
>                 
>                 
>                 Envelope env = null;
>                 if (bounds != null){
>                       env = new Envelope(new Coordinate(bounds.getMinX(),
> bounds.getMinY()),new Coordinate(bounds.getMaxX(), bounds.getMaxY()));
>                 }
>                 geometryTranslator.encode(env, srsName);
>                 contentHandler.endElement("", "", boundedBy);
>             } catch (SAXException se) {
>                 throw new RuntimeException(se);
>             }
>         }
>
> I think it would be usefull to change the Signature of the
> geometryTranslator.encode(Envelope, String) method instead of my Fix.
>
>
> Could you review the Code?
> I attach a patchfile.
>
>
> Thanks a lot 
> Tim
>
>
>
>  <<FeatureTranslator_writeBounds.patch>> 
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to