On Wed, May 8, 2013 at 9:51 PM, Frank Warmerdam <warmer...@pobox.com> wrote:
> Andrea,
>
> I'm not currently a user of the grid coverage reader, but I might at some
> point. Skimming the proposal I was wondering:
>
> 1) Why you offer the getMetadataNames(coverage,...) and
> getMetadataValues(coverage,...) on GridCoverageReader instead of handling
> them on GridCoverage.
>
Mind, this is not part of the proposal, the API has been like that for
years, but reading the coverage with some backends
implies... actually reading the pixels.
The reader is thus also a way to get all the meta information without being
forced to read the coverage (which would result in the
client code doing some silly things like trying to read a 1x1 coverage in
an attempt not to read too much data)
>
> 2) Similarly, why is the new GridCoverage2DReader interface on
> GridCoverageReader instead of offering that interface on the GridCoverage.
>
Same as above.
>
> I'm guessing it is assumed the reader can provide some overall information
> cheaply while it is assumed that the read() operation returning a
> GridCoverage is expensive. But it *feels* like an awkward arrangement.
>
It's exactly like this. I don't see the awkward side though, if I want meta
information I normally don't need the data, and once I've read the data is
too late for some information anyways, such as getting the list of times
and elevation, once I have the coverage, which is a 2d flat object, those
are gone (some selection or mosaicking already took place)
Cheers
Andrea
--
==
GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel