Hi Jodi,
thanks I missed those lines of the doc.
Anyway I forgot a part in my email/question. GDAL let me open a raster
without loading it in memory. It will randomly accessed whenever I ask a
certain pixel/block.
GT insted will "lazily" load only tiled tiffs, right? And it will be done
on the base of the tile size. There's no mean to read a user defined block
of cells, except extracting it through a crop operation. Do you confirm
this?

Thanks again,
Giovanni

2013/3/27 Jody Garnett <[email protected]>

> 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&reg; 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
>
>
>


-- 
Giovanni Allegri
website: http://giovanniallegri.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
------------------------------------------------------------------------------
Own the Future-Intel&reg; 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