[geotk] [JIRA] Created: (GEOTK-49) Add a CRS.isHorizontalCRS(...) convenience method

Martin Desruisseaux (JIRA) jira at geomatys.com
Tue Oct 13 15:16:01 EDT 2009

Add a CRS.isHorizontalCRS(...) convenience method

                 Key: GEOTK-49
                 URL: http://jira.geotoolkit.org/browse/GEOTK-49
             Project: Geotoolkit
          Issue Type: Improvement
          Components: Referencing
    Affects Versions: 3.04
            Reporter: Martin Desruisseaux
            Assignee: Martin Desruisseaux
            Priority: Minor

It is possible to check if a CRS is vertical or temporal using {{(crs instanceof VerticalCRS)}} or {{(crs instanceof TemporalCRS)}} check, but there is no similar check for horizontal CRS. A "horizontal" CRS can be a {{GeographicCRS}}, a {{ProjectedCRS}} or a {{DerivedCRS}} having an other horizontal CRS as its base (assuming that the coordinate system of the derived CRS stay in the same plane than its base CRS). The {{(crs == CRS.getHorizontalCRS(crs))}} idiom can be used, but it is potentially costly: if the given CRS is a 3D geographic CRS, the {{getHorizontalCRS}} method will try hard to extract a 2D geographic CRS from it, only to be discarted after the {{==}} check. A cheaper {{isHorizontalCRS(crs)}} method is desired.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.geotoolkit.org/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the Geotoolkit mailing list