You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by "Martin Desruisseaux (Jira)" <ji...@apache.org> on 2019/10/20 19:36:00 UTC

[jira] [Closed] (SIS-368) When a coordinate operation change the longitude axis range from [-180 … +180]° to [0 … 360]°, the Envelopes.transform(…) result should be normalized accordingly

     [ https://issues.apache.org/jira/browse/SIS-368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Desruisseaux closed SIS-368.
-----------------------------------

> When a coordinate operation change the longitude axis range from [-180 … +180]° to [0 … 360]°, the Envelopes.transform(…) result should be normalized accordingly
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SIS-368
>                 URL: https://issues.apache.org/jira/browse/SIS-368
>             Project: Spatial Information Systems
>          Issue Type: Improvement
>          Components: Referencing
>    Affects Versions: 0.5, 0.6, 0.7
>            Reporter: Martin Desruisseaux
>            Assignee: Martin Desruisseaux
>            Priority: Major
>             Fix For: 0.8
>
>
> There is at least two conventions regarding the range of longitude values: -180° to 180° or 0° to 360°. The range is specified with {{CoordinateSystemAxis}} minimum and maximum attributes. Most of the times, we use the -180° to +180° convention. However when an envelope is transformed with {{Envelopes.transform(CoordinateOperation, Envelope)}} method, if the longitude range declared in the coordinate system changes, we expect the envelope longitude values to be updated accordingly.
> We could invoke {{GeneralEnvelope.normalize()}} after envelope transformation, but we don't want to invoke it systematically. If the {{CoordinateOperation}} does not change the longitude range, then it is safer to let the longitude values as we found them, even if they are slightly outside the expected range. Example:
> * If source CRS uses longitudes in the \[-180 … +180\]° range and target CRS uses longitudes are in the \[-180 … +180\]° range, then do nothing. Even if the transformation result is an envelope spanning 175° to 185° of longitude, leave it as-is because the original envelope was probably already crossing the anti-meridian (not necessarily using longitudes; we can cross the anti-meridian with the Mercator projection too).
> * If source CRS uses longitudes in the \[0 … 360\]° range and target CRS uses longitudes are in the \[0 … 360\]° range, do nothing for the same reason than above.
> * If source CRS uses longitudes in the \[-180 … +180\]° range and target CRS uses longitudes are in the \[0 … 360\]° range, then if the envelope result is outside the \[0 … 360\]° range, brings it back to the \[0 … 360\]° range as described in {{GeneralEnvelope.normalize()}}.
> * If source CRS uses longitudes in the \[0 … 360\]° range and target CRS uses longitudes are in the \[-180 … +180\]° range, then if the envelope result is outside the \[-180 … +180\]° range, brings it back to the \[-180 … +180\]° range.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)