Hi Fiona,

If it is a JTS Envelope you can use GeometryFactory.toGeometry method.

If it is a opengis Envelope then I don't think there's a shortcut way
- although I'd be pleased to be corrected :)  So, you get the corner
coords with getLowerCorner and getUpperCorner methods, both of which
return a DirectPosition object; get the ordinates with
DirectPosition.getCoordinate method; and then use GeometryFactory to
construct your polygon with these coords.

Michael


2008/11/19 Fionageo08 <[EMAIL PROTECTED]>:
>
> Hello,
>
>  I would like to know if there is any way to create a polygon based on the
> coordinates of an Envelope using JTS?
>
>  thank you,
>
> Fiona
> --
> View this message in context: 
> http://www.nabble.com/Create-a-polygon-from-Envelope-tp20577995p20577995.html
> Sent from the geotools-devel mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to