I wanted to say a *big* thank you to Andrea and Jody for answering my recent
questions. With your help I was able to finish a project on time today. Thanks
very much for all you do.
-Scott
-----Original Message-----
From: [email protected] on behalf of Andrea Aime
Sent: Fri 9/2/2011 1:31 AM
To: Jody Garnett
Cc: Scott Ellis; [email protected]
Subject: Re: [Geotools-devel] how to get local file from GridCoverage2D
On Fri, Sep 2, 2011 at 12:20 AM, Jody Garnett <[email protected]> wrote:
> There is an example in the geoserver code base; one that allows direct
> access to a raster file so it can be exported.
> As for the general answer I think that GridCoverage2D is the wrong object
> (it is the answer to a question; GridCoverageReader is the thing you are
> asking the question of which would know about the file).
GridCoverage2d is what the raster processes actually trade with, I also
considered trading readers but it was hard to do.
About getting the file source, if available, we don't have a good, established
way.
The georectify process does this:
final Object fileSource =
coverage.getProperty(AbstractGridCoverage2DReader.FILE_SOURCE_PROPERTY);
if (fileSource != null && fileSource instanceof String) {
location = (String) fileSource;
}
But the property was introduced especially for this process and the
intended data source, the image collection reader, which is a community
module in geotools trunk.
The other raster data sources still do not expose the property
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel