Hi, all,
I'm with Martin on this one.  I believe that the LatLongRect is too
confining for what we're trying to do. The lack of CRS by itself
disqualifies this class from being used, in my mind.

As for the ability to get Java2D geometries from the geometries we define,
we can either include them as a non-standard helper method, or define a
helper class that can do the conversion outside of our standard library.  I
still believe after all of this that the Envelope class is closer to what
we actually want.

Jor


On Tue, Dec 18, 2012 at 5:13 AM, Martin Desruisseaux <
[email protected]> wrote:

> Hello all
>
> With the code committed yesterday, we now have some class overlaps:
>
> The LatLon class [1] overlaps the various DirectPosition classes. LatLon
> is two dimensional, restricted to geographic latitude/longitude and does
> not provide information about the Coordinate Reference System, while the
> DirectPosition classes are more generic. However LatLon provides the
> following methods which are not in DirectPosition:
>
>   * getShiftedLat() / getShiftedLon()
>   * getNormLon()
>
> The formers translate the latitude and longitude by +90 and +180°
> respectively. The Javadoc said that this is for Java2D geometries, but it
> is not clear for me why since Java2D can work with negative coordinates
> without problems... The later ensures that the longitude is in the -180 ...
> +180° range. GeneralDirectPosition doesn't have such method, but it could
> be added.
>
> The situation is similar for LatLongRect vs Envelope classes. LatLongRect
> provides the following method:
>
>   * Rectangle2D[] getJavaRectangles()
>
> This method splits an envelope crossing the anti-meridian in two
> envelopes. However I wonder if this operation should be done in an external
> class instead than Envelope. For example a MultiPolygon class may have some
> preferred internal representation for this kind of situation.
>
> Note that because of its restriction to geographic coordinates,
> LatLongRect is actually closer to GeographicBoundingBox (an ISO 19115
> object) than Envelope (an ISO 19107 object). But in both cases, we have a
> type defined by ISO standards for this structure... So what do we do with
> them?
>
>         Martin
>
>
> [1] https://builds.apache.org/job/**sis-jdk7/site/apidocs/org/**
> apache/sis/core/LatLon.html<https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/core/LatLon.html>
> [2] https://builds.apache.org/job/**sis-jdk7/site/apidocs/org/**
> apache/sis/core/LatLonRect.**html<https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/core/LatLonRect.html>
>
>

Reply via email to