Thanks Martin,
but...unfortunately...I...erm...don't get it...
What exacly is your code doing?
"Rectangle pixelBounds" is the bounding box of the polygon?
What is "CRS" in the third line - the CRS of the grid coverage? The
transform-method is undefined for
org.opengis.referencing.crs.CoordinateReferenceSystem - which type is
it?
Finally I've got a Rectangle2D of the polygon's bounding box - in
geographic units - right?
And now?
Gosh, I'm confused.
Christian
Am 17.06.2008 um 10:03 schrieb Martin Desruisseaux:
[EMAIL PROTECTED] a écrit :
> given a GridCoverage2D and a rectangle (derived from the bouning box
> of a polygon), what is the best way to get the world/geographic
> coordinates of the pixels the rectangle contains?
MathTransform tr = GridCoverage2D.getGridGeometry().getGridToCRS();
Rectangle pixelBounds = ...
Rectangle2D geographicBounds = CRS.transform(tr, pixelBounds, null);
Martin
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users