Issue Details (XML | Word | Printable)

Key: GEOT-1783
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Martin Desruisseaux
Reporter: Martin Desruisseaux
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
GeoTools

OperationNotFoundException when sourceCRS is a ProjectedCRS + VerticalCRS

Created: 24/Apr/08 09:39 AM   Updated: 24/Apr/08 09:39 AM
Component/s: core referencing
Affects Version/s: 2.5-M0
Fix Version/s: None


 Description  « Hide
DefaultCoordinateOperationFactory.createOperation works as expected with 3D or 4D source CRS in the following cases:
  • No datum shift.
  • Datum shift required but no vertical axis (only a temporal one).
  • Datum shift required but the 3D CRS is a GeographicCRS with height above the ellipsoid.

But it doesn't work anymore in the following cases:

  • Datum shift required and the vertical axis is height above the geoid. This is the subject of "referencing 3D" and will not be discussed further in this issue.
  • Datum shift required, the vertical axis is height above the ellipsoid and the horizontal CRS is a ProjectedCRS.

The last failure is unexpected. I suspect (but didn't tested) that it would occur with any derived CRS, not just ProjectedCRS. Steps to reproduce:

@Test
public void testProjected4D() throws Exception {
    CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:3395");
    CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:27572");
    sourceCRS = new DefaultCompoundCRS("3D", sourceCRS, DefaultVerticalCRS.ELLIPSOIDAL_HEIGHT);
    sourceCRS = new DefaultCompoundCRS("4D", sourceCRS, DefaultTemporalCRS.JULIAN);
    CRS.findMathTransform(sourceCRS, targetCRS);
}

Results:

org.opengis.referencing.operation.OperationNotFoundException: Aucune transformation du système "CompoundCRS[4D]" vers "GeographicCRS[WGS 84]" n'est disponible.
	at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1360)
	at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1200)
	at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:358)
	at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1210)
	at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:358)
	at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:319)
	at org.geotools.referencing.operation.BufferedCoordinateOperationFactory.createOperation(BufferedCoordinateOperationFactory.java:253)
	at org.geotools.referencing.CRS.findMathTransform(CRS.java:947)
	at org.geotools.referencing.CRS.findMathTransform(CRS.java:915)


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.