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

Martin Desruisseaux updated SIS-357:
------------------------------------
        Fix Version/s:     (was: 1.1)
                       1.2
    Affects Version/s: 1.1
                       1.0

> EPSG factory should be able to create geocentric CRS as derived CRS
> -------------------------------------------------------------------
>
>                 Key: SIS-357
>                 URL: https://issues.apache.org/jira/browse/SIS-357
>             Project: Spatial Information Systems
>          Issue Type: Improvement
>          Components: Referencing
>    Affects Versions: 0.7, 0.8, 1.0, 1.1
>            Reporter: Martin Desruisseaux
>            Assignee: Martin Desruisseaux
>            Priority: Minor
>             Fix For: 1.2
>
>
> The {{EPSGDataAccess.createCoordinateReferenceSystem(String)}} queries the 
> EPSG {{"Coordinate Reference System"}} table with more than 10 columns. Some 
> relevant columns for this tasks are:
> * {{COORD_REF_SYS_KIND}} (may be "geographic 2D", "geographic 3D", 
> "geocentric", "projected", _etc._)
> * {{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:
> {code:java}
> CoordinateOperation op = …,
> CoordinateReferenceSystem base = ...;
> if (op instanceof Conversion && base instanceof SingleCRS) {
>     crs = DefaultDerivedCRS.create(properties, (SingleCRS) base, (Conversion) 
> op, cs);
> }
> {code}
> 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
(v8.3.4#803005)

Reply via email to