The doc page is here 
http://docs.geotools.org/latest/userguide/library/coverage/grid.html 

And provides an example of "evaluate" on a coverage:
    
    GridCoverage2D coverage = reader.read(null);
    
    // direct access
    DirectPosition position = new DirectPosition2D( crs, x, y);
    
    double[] sample = (double[]) coverage.evaluate( position ); // assume double
    
    // resample with the same array
    sample = coverage.evaluate( position, sample );


-- 
Jody Garnett


On Thursday, 28 March 2013 at 8:56 AM, G. Allegri wrote:

> Hi, 
> I apologize for the trivial question but I have much more experience with 
> GDAL (+Python) then Geotools. 
> I need to sample a raster file (GeoTiff) on a set of coordinates. 
> Is there any way for a Coverage to read a value similar to the GDAL's 
> readRaster [1] and readAsArray [2] methods? 
> Thanks in advance for your help, 
> Giovanni 
> [1] http://gdal.org/python/osgeo.gdal.Dataset-class.html#ReadRaster1
> [2] http://gdal.org/python/osgeo.gdal_array-module.html#BandReadAsArray
> Sent from Nexus 
> ------------------------------------------------------------------------------
> Own the Future-Intel® Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game 
> on Steam. $5K grand prize plus 10 genre and skill prizes. 
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> 
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected] 
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
> 


------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to