Hey Martin, On 12/18/12 2: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. +1, I filed a JIRA for this, and will try and get to it by the end of the week: https://issues.apache.org/jira/browse/SIS-68 > >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. Filed: https://issues.apache.org/jira/browse/SIS-69 To track this. > >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? Replace them and integrate what you're doing (which is actively maintained, and supported) into the Quad Tree :) I'll help. Cheers, Chris > > Martin > > >[1] >https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/core/La >tLon.html >[2] >https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/core/La >tLonRect.html >
