sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <>
Subject [jira] [Created] (SIS-357) EPSG factory should be able to create geocentric CRS as derived CRS
Date Fri, 05 May 2017 10:01:04 GMT
Martin Desruisseaux created SIS-357:

             Summary: EPSG factory should be able to create geocentric CRS as derived CRS
                 Key: SIS-357
             Project: Spatial Information Systems
          Issue Type: Improvement
          Components: Referencing
    Affects Versions: 0.7, 0.8
            Reporter: Martin Desruisseaux
            Assignee: Martin Desruisseaux
            Priority: Minor

The {{EPSGDataAccess.createCoordinateReferenceSystem(String)}} queries the EPSG {{"Coordinate
Reference System"}} table with more than 10 columns. Some relevant columns for this tasks

* {{COORD_REF_SYS_KIND}} (may be "geographic 2D", "geographic 3D", "geocentric", "projected",
* {{SOURCE_GEOGCRS_CODE}} (EPSG code of a {{GeographicCRS}})
* {{PROJECTION_CONV_CODE}} (EPSG code of a {{CoordinateOperation}})

Current {{EPSGDataAccess}} implementation uses the {{SOURCE_GEOGCRS_CODE}} and {{PROJECTION_CONV_CODE}}
columns only if the {{COORD_REF_SYS_KIND}} is {{"projected"}}. But the EPSG database sometime
uses those columns for other kind of CRS. For example with WGS 84 coordinate reference systems:

* EPSG:4326 (geographic 2D) is derived from EPSG:4979 (geographic 3D) with conversion EPSG:15593
(geographic3D to geographic2D).
* EPSG::4979 (geographic 3D) is derived from EPSG::4978 (geocentric) with conversion EPSG:15592
(geocentric to geographic3D).

We could modify {{EPSGDataAccess}} as below:

* Unconditionally build a coordinate operation from {{SOURCE_GEOGCRS_CODE}} and {{PROJECTION_CONV_CODE}}
columns instead than only in the projected CRS case.
* Above operation is mandatory for projected CRS case, optional for all other.
* If an operation was found, use it for creating a derived CRS like below:

CoordinateOperation op = …,
CoordinateReferenceSystem base = ...;
if (op instanceof Conversion && base instanceof SingleCRS) {
    crs = DefaultDerivedCRS.create(properties, (SingleCRS) base, (Conversion) op, cs);

However we may want to keep _Well Known Text_ (WKT) outputs simple by formatting the CRS as
if it was a non-derived CRS. How to handle that is an open question.

This message was sent by Atlassian JIRA

View raw message