You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sis.apache.org by Martin Desruisseaux <ma...@geomatys.fr> on 2012/12/17 19:17:00 UTC

Committed Envelope implementations

Hello all

Various Envelope implementations has been committed. On Apache SIS, the 
main implementation is GeneralEnvelope (already merged on all SIS branches):

https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/geometry/GeneralEnvelope.html

The GeneralEnvelope class is an implementation of the Envelope interface 
defined in GeoAPI on the basis of ISO 19107. This implementation is 
"general" because it accepts an arbitrary Coordinate Reference System 
(not necessarily geographic) of arbitrary dimension. This class supports 
"wraparound" axes, the most common case being longitudes crossing the 
anti-meridian, but other kind of axes could also have "wraparound" 
property (e.g. dates in climatology). The GeoAPI CoordinateSystemAxis 
interface derived from ISO 19111 contains the information needed. Every 
add(...), contains(...) and intersects(...) methods in GeneralEnvelope 
should works correctly with wraparound axes.

The geometry package provides also an Envelope2D implementation as a 
subclass of java.awt.Rectangle2D. This class is provided for Java2D 
interoperability, but as the name implies is restricted to 
two-dimensional coordinates. All its methods have been overwritten for 
supporting wraparound axes too.

I also committed a very simple implementation in the public domain for 
demonstration purpose:

http://www.geoapi.org/geoapi-examples/apidocs/org/opengis/example/geometry/SimpleEnvelope.html

For Tika, one approach that Joe or other may consider could be:

 1. Add a dependency to GeoAPI 3.0.0 (official release only, no milestone).
 2. Copy/modify the SimpleEnvelope example in a Tika's
    *package-privated* class under Apache 2 license.
 3. Make sure that the public API expose only the Envelope interface,
    never the SimpleEnvelope implementation.
 4. Only if experience shows that Tika needs a more powerful geospatial
    engine, delete the SimpleEnvelope implementation and use
    GeneralEnvelope instead. Code using the Envelope interface should
    not be affected.


     Martin


Re: Committed Envelope implementations

Posted by "Mattmann, Chris A (388J)" <ch...@jpl.nasa.gov>.
Thanks Martin!

I'm going to reference this thread in TIKA-605 and we can proceed there,
and keep both lists informed.

Thanks!

Cheers,
Chris

On 12/17/12 10:17 AM, "Martin Desruisseaux"
<ma...@geomatys.fr> wrote:

>Hello all
>
>Various Envelope implementations has been committed. On Apache SIS, the
>main implementation is GeneralEnvelope (already merged on all SIS
>branches):
>
>https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/geometr
>y/GeneralEnvelope.html
>
>The GeneralEnvelope class is an implementation of the Envelope interface
>defined in GeoAPI on the basis of ISO 19107. This implementation is
>"general" because it accepts an arbitrary Coordinate Reference System
>(not necessarily geographic) of arbitrary dimension. This class supports
>"wraparound" axes, the most common case being longitudes crossing the
>anti-meridian, but other kind of axes could also have "wraparound"
>property (e.g. dates in climatology). The GeoAPI CoordinateSystemAxis
>interface derived from ISO 19111 contains the information needed. Every
>add(...), contains(...) and intersects(...) methods in GeneralEnvelope
>should works correctly with wraparound axes.
>
>The geometry package provides also an Envelope2D implementation as a
>subclass of java.awt.Rectangle2D. This class is provided for Java2D
>interoperability, but as the name implies is restricted to
>two-dimensional coordinates. All its methods have been overwritten for
>supporting wraparound axes too.
>
>I also committed a very simple implementation in the public domain for
>demonstration purpose:
>
>http://www.geoapi.org/geoapi-examples/apidocs/org/opengis/example/geometry
>/SimpleEnvelope.html
>
>For Tika, one approach that Joe or other may consider could be:
>
> 1. Add a dependency to GeoAPI 3.0.0 (official release only, no
>milestone).
> 2. Copy/modify the SimpleEnvelope example in a Tika's
>    *package-privated* class under Apache 2 license.
> 3. Make sure that the public API expose only the Envelope interface,
>    never the SimpleEnvelope implementation.
> 4. Only if experience shows that Tika needs a more powerful geospatial
>    engine, delete the SimpleEnvelope implementation and use
>    GeneralEnvelope instead. Code using the Envelope interface should
>    not be affected.
>
>
>     Martin
>