Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.0
-
None
Description
We are unable to create a CoordinateOperation from the WKT that comes from an existing CoordinateOperation object.
The code below can be used to test this:
CoordinateOperationAuthorityFactory opFactory = (CoordinateOperationAuthorityFactory) CRS.getAuthorityFactory("EPSG");
CoordinateOperation opFromCode = opFactory.createCoordinateOperation("5630");
_String operationWKT = opFromCode.toWKT();
WKTFormat wf = new WKTFormat(null, null);
CoordinateOperation opFromWKT = (CoordinateOperation) wf.parseObject(operationWKT);_
When trying to execute this code the following error is returned:
org.apache.sis.io.wkt.UnparsableObjectException: Error in “COORDINATEOPERATION”: Missing value for “tgt_semi_major” parameter.
at org.apache.sis.io.wkt.Element.parseFailed(Element.java:383)
at org.apache.sis.io.wkt.GeodeticObjectParser.parseOperation(GeodeticObjectParser.java:2279)
at org.apache.sis.io.wkt.GeodeticObjectParser.parseObject(GeodeticObjectParser.java:306)
at org.apache.sis.io.wkt.AbstractParser.parseObject(AbstractParser.java:283)
at org.apache.sis.io.wkt.GeodeticObjectParser.parseObject(GeodeticObjectParser.java:244)
at org.apache.sis.io.wkt.WKTFormat.parse(WKTFormat.java:753)
at org.apache.sis.io.CompoundFormat.parseObject(CompoundFormat.java:317)