Hello Pieter, > Thanx Micheal, that dependency was missing... I got it working and played > around with it a bit.
Good to hear. That must be a relief :) > I understand I can return a specific pixel value in the GeoTiff by passing > lat,lon to DirectPosition2D. If the lat,lon fall inbetween pixels, does it > use nearest neighbour or does it interpolate between pixels? (Maybe > something like a distance weighted mean?) Do you mean when working with a GridCoverage2D object ? If so, the default behaviour is just to get the nearest grid value to the location. You can however create a child coverage with the Interpolate2D class which has a number of static create methods where you can specify the type of interpolation required (e.g. bilinear)... http://docs.geotools.org/stable/javadocs/org/geotools/coverage/grid/Interpolator2D.html#create(org.geotools.coverage.grid.GridCoverage2D,%20javax.media.jai.Interpolation) > This is fine for Aster, which I know is near North-Up orientation, but > typically I would like to return Elevation values at each pixel in the image > grid, rather moving in a lat,lon grid. This will sort out any potential > rotation or interpolation isues... > > Is there a way I can return the lat, lon and pixelValues[] for any specified > pixel in the geoTiff? (i.e. passing image coordinates to return > corresponding lat,lon, etc...) The GridGeometry2D class is your friend for that. It provides methods to convert between grid (image) and world coordinates. See the "gridToWorld" and "worldToGrid" methods... http://docs.geotools.org/stable/javadocs/org/geotools/coverage/grid/GridGeometry2D.html I wish I could point you to some examples in the GeoTools user guide for the above but I don't think there are any. The coverage module is a bit sad in that regard. In lieu of that, I'm copying this message to Simone, who is the module maintainer, and Andrea, who uses the module intensively. Either of them should be able to give you much more expert advice. Michael ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
