org.geotools.referencing.CRS cannot parse it's own WKT

Description

The following test method demonstrates that the lambert projection creates a wkt that geotools cannot parse. I serialize out the wkt for saving within my application, and therefore I cannot support these projections with Geotools in my application.

@Test
public void testLambertParsing()
{
try
{
String initialLambertWkt = "PROJCS[\"LAMBERT WKT\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6371200.0,0]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Lambert_Conformal_Conic\"],PARAMETER[\"standard_parallel_1\",25.0],PARAMETER[\"latitude_of_origin\",25.0],PARAMETER[\"central_meridian\",-95.0],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],PARAMETER[\"Scale_Factor\",1.0],UNIT[\"m\",1]]";

CoordinateReferenceSystem lambertCRS = CRS.parseWKT(initialLambertWkt);

String parsedLambertWkt = lambertCRS.toWKT();

lambertCRS = CRS.parseWKT(parsedLambertWkt);

}
catch(FactoryException ex)
{
Logger.getLogger(CRSUnitTest.class.getName()).log(Level.SEVERE, null,
ex);
}
}

Environment

jdk1.8.0_101 on windows 10

Status

Assignee

Andrea Aime

Reporter

Caleb DeChant

Triage

Components

Fix versions

Affects versions

Priority

Highest
Configure