You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sis.apache.org by Michael Arneson <mi...@geotoolkit.net> on 2020/02/18 22:11:40 UTC
Regression bug with epsg code 1693 and transform 32002
When trying to run the following code:
CRSAuthorityFactory authorityFactory =
CRS.getAuthorityFactory("EPSG");
CoordinateOperationAuthorityFactory opFactory =
(CoordinateOperationAuthorityFactory) authorityFactory;
CoordinateOperation datumOperation =
opFactory.createCoordinateOperation("1693");
CoordinateReferenceSystem crs =
authorityFactory.createCoordinateReferenceSystem("32002");
crs =
AbstractCRS.castOrCopy(crs).forConvention(AxesConvention.DISPLAY_ORIENTED);
CoordinateOperation datumToXYOperation =
CRS.findOperation(datumOperation.getSourceCRS(), crs, null);
MathTransform step1 = datumOperation.getMathTransform().inverse();
MathTransform step2 = datumToXYOperation.getMathTransform();
MathTransform wgs84ToXYTransform =
MathTransforms.concatenate(step1, step2);
DirectPosition source = new DirectPosition2D(47.0, -110.0);
//getting the tranform causes an error to be thrown
DirectPosition target = wgs84ToXYTransform.transform(source, null);
I get the following exception:
org.apache.sis.internal.referencing.RTreeNode cannot be cast to
org.apache.sis.referencing.operation.transform.SpecializableTransform$SubArea
java.lang.ClassCastException: org.apache.sis.internal.referencing.RTreeNode
cannot be cast to
org.apache.sis.referencing.operation.transform.SpecializableTransform$SubArea
at
org.apache.sis.referencing.operation.transform.SpecializableTransform.locate(SpecializableTransform.java:257)
at
org.apache.sis.referencing.operation.transform.SpecializableTransform.access$200(SpecializableTransform.java:54)
at
org.apache.sis.referencing.operation.transform.SpecializableTransform$Inverse.transform(SpecializableTransform.java:572)
at
org.apache.sis.referencing.operation.transform.ConcatenatedTransformDirect.transform(ConcatenatedTransformDirect.java:67)
at
org.apache.sis.referencing.operation.transform.ConcatenatedTransformDirect.transform(ConcatenatedTransformDirect.java:68)
at
org.apache.sis.referencing.operation.transform.ConcatenatedTransformDirect.transform(ConcatenatedTransformDirect.java:67)
at
org.apache.sis.referencing.operation.transform.ConcatenatedTransformDirect.transform(ConcatenatedTransformDirect.java:67)
This exception did not appear in the previous version of Apache SIS (before
the NTv2 update)
Thanks,
--
*Michael Arneson*
*Software Engineer*
*Office:* +1 (713) 975-7434
michael.arneson@int.com
*INT *| *Empowering Visualization*
Re: Regression bug with epsg code 1693 and transform 32002
Posted by Martin Desruisseaux <ma...@geomatys.com>.
Hello Michael
Thanks for reporting. I just pushed a fix on master. Could you try again
please?
Martin