Jody Garnett a écrit :
> Simplify :-) Remember you can add more later - for now cover what you
> need. A lot of the "indirection" defined by the OGC is only of benefit
> to their XML specifications.
My issue here is that I'm not creating interfaces, so it will not be possible to
add later a new method delegating to an existing one, or deprecate old methods.
In the IIOMetadataFormat context, "simplify" means "departure from OGC
specification", and putting back inline later will be compatibility breaks. But
on an other hand it is not possible to comply strictly to OGC specification, so
we will have departures anyway...
> I would also like to ask if we can reuse objects more often - I would
> like to see a field "boundedBy" of type BoundingBox.
I'm not creating any new objects. Everything is a IIOMetadataNode no matter if
it is a CRS, BoundingBox, etc. The values are stored as child IIOMetadataNodes
until we reach the point where the value can be represented as a plain String.
Image metadata are often stored as plain text in some file header. We are not
yet creating objects from them (it will be the job of an other package). We just
need to provide standard accessors to the text values. For example we can decide
that the path "boundedBy/Envelope/lowerCorner" (or "boundedBy/lowerCorner" if we
decide to apply the simplifications) returns the lower corner as a String or a
double[] array no matter the underlying image format. The Image I/O job stop
there. Building a BoundingBox object from this information is an other package's
job.
In other words, this exactly equivalent to the Map you wanted to create for the
EPSG authority factory (one object filling Map values, an other object building
objects from the Map values). The differences are that:
* The mechanism is standardized in J2SE. The Map role is handled by
javax.imageio.metadata.IIOMetadata.
* We don't need to invent arbitrary map keys. The keys are the XML
entity names defined in "GML in JPEG 2000" specification.
> Is there a difference in meaning between boundedBy and limits? Or can
> they both be the same concept?
"boundedBy" seems to be the bounding box in "real world" coordinates (as
'double' values), while "limits" seems to be the bounding box in grid
coordinates (as 'int' values). But they are redundant since the "boundedBy"
envelope can be computed from the "limits" transformed using an affine transform
built from the "origin" and "offsetVectors". I guess that "boundedBy" is
provided mostly as a convenience for avoiding this computation.
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel