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
[2]
https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/core/LatLonRect.html