Joe McMahon a écrit :
1. I had to scale the raster size down ( my original width/height is
27K x 27K which was throwing OutOfMemory errors, even with increased
heap parameters) - so is there a way to apply the AffineTransform to a
point in an "abstract" raster ( i.e. one that we don't instantiate) to
get to the next point (see #2)
If you already have the AffineTransform, the following should be enough:
Point2D pixelCoords = ...;
Point2D latlong = affineTransform.transform(pixelCoords, null);
2. Now that I have a GridCoverage2D - how can I query a particular
raster's point (x, y coordinate in the raster) and return the Lat/Long -
it looks like the FramFactory resulting swing app does this, but can I
do it thru an API by passing an x,y and getting a lat,long back?
DirectPosition pixelCoords = ...;
DirectPosition latlong =
gridCoverage.getGridGeometry().getGridToCoordinateSystem().transform(pixelCoords,
null);
Note that "getGridToCoordinateSystem()" is misnamed ("getGridToCRS()"
would be better) and will probably be renamed in a future version. We
will process in the usual way; deprecate the
"getGridToCoordinateSystem()" method when the replacement will be ready,
and remove the deprecated Geotools method after at least one release
cycle (e.g. if the method is deprecated in Geotools 2.3, it will not be
removed before Geotools 2.4).
Martin.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users