On Wed, Jun 11, 2008 at 8:49 PM, Martin Desruisseaux
[EMAIL PROTECTED] wrote:
Jon Blower a écrit :
1) A coverage represented internally by a grid (e.g. numerical model
output, digital photo or satellite image) is a type of
DiscreteCoverage in ISO19123 (perhaps a DiscreteGridPointCoverage)?
In my understanding, a ContinuousCoverage could be backed by a grid as well,
but
with the addition of an interpolation.
2) For a DiscreteCoverage, if I ask for a value at a point that
doesn't correspond exactly with a grid point I will get the value from
the nearest grid point (i.e. nearest-neighbour interpolation). Or do
I actually get null?
Nearest neighbour in my understanding.
3) However, in GeoTools, the DiscreteCoverages are not implemented.
The GridCoverage2D class does not implement ISO19123 interfaces but it
is effectively a discrete coverage that performs nearest-neighbour
interpolation.
Yes. A subtile nuance is that a GridCoverage2D subclass (namely
Interpolator2D)
act as a ContinuousCoverage. If GridCoverage2D is declared as a
DiscreteCoverage
and if we follow ISO 19123 spirit, then GridCoverage2D should not have any
children that are ContinuousCoverage; it would need to be a different
hierarchy.
I am not so sure about this interpreation, but of course I might be wrong.
The coverage function for a DiscreteCoverage list a collection of
GeometryValue pairs.
A GeometryValue pair would be something like DomainObject, Record.
If we have a discrete coverage where the DomainObjects are points we
should then have a set of pairs pont,values. I remember that 19123
says that locate and evaluate should return null or (no data) if ask
for a direct position that is not contained in any of the
DomainObjects contained in the overage function collection.
Note that the case of having an envelope as a DomainObject would mean
that have only record for the coverage over the whole envelope.
To summarize, it seems to me that a GridCoverage2D as it is
implemented right now is a ContinuousCoverage that simply does NN
interpolation within its envelope.
If we would want to implement it as a discrete coverage where the
DomainObjects are points we should have to provide a geom-value pair
for each point inside what we actually call the envelope of the
coverage and return null if we don't ask exactly for one of the
positions we have.
Of course this opens a discussion by itself since we would have to
decide how close we have to be to a certain point to actually say,
that we have a much. Food for more thoughts probably...
Simone.
4) If I want bilinear (or bicubic or anything else) interpolation then
I need to take my GridCoverage2D and somehow convert it to an
Interpolator2D. How do I do this?
Use the Operations.interpolate(...) method.
Another question: Is it possible to have different interpolation
methods in different directions (e.g. nearest-neighbour in the
horizontal, linear in the vertical)?
Yes. Interpolator2D acts only on 2D slices. In order to create the vertical or
temporal dimension, you can give a list of GridCoverage2D (or Interpolator2D)
to
CoverageStack. The later uses its own interpolation mechanism for the
dimensions
that are not managed by Interpolator2D. Currently the supported CoverageStack
interpolations are only nearest neighbor and linear.
Martin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
GeoShaver group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/geoshaver?hl=en-GB
-~--~~~~--~~--~--~---
--
---
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy
phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928
http://www.geo-solutions.it
---
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users