On Fri, Aug 1, 2014 at 9:30 AM, andrea antonello <andrea.antone...@gmail.com
> wrote:

> Hi Gaby,
>
> > I am retooling an application that is using a home grown “map” interface,
> > replacing the latter with geotools.
> > Some of the data comes as georeferenced images. These are created by
> helper
> > tools from CSV files, ESRI bin files or NETCDF files.
> >
> > All good so far. I can read these files no problem using the
> > GridCoverageReader.
> >
> > All the images produced this way are RGB PNG’s which come with an
> additional
> > file with the extension “range" which gives
> > the range of the physical values represented by each pixel.  Without this
> > information I cannot get pack the physical value at
> > each pixel (wind velocity, flood depth, that sort of thing)
>
> Actually apart of being quite a hack, I don't think that you can get
> the real value back in every case, don't you?
> From the png you get rgb values in 0-255 ranges. What should happen
> next? A mapping to a physical value?
>
> This sounds very strange to me.
> Not sure what the range file really contains, though.
>

Actually the whole coverage model as build originally by M. Desriusseaux was
based on this kind of hack, png images with integer values that are
transformed
to a phisical value via a linear transformation, under the assumption that
the quantization occurring in PNG encoding via the palette is not going
to affect significantly the data (e.g., the encoding error is significantly
lower than the sensor error).

The tests in this package provide some examples on how to use these
concepts:
https://github.com/geotools/geotools/tree/master/modules/library/coverage/src/test/java/org/geotools/coverage/grid

Basically the idea is that the coverage is build using the png as the
rendered image, and the grid sample
dimensions do contain the transformations to the geophisic interpretation
of the coverage, which
can be obtained as a GridCoveage by getting the geophisics view of it

Cheers
Andrea

-- 
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 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

-------------------------------------------------------
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to