[ 
http://jira.codehaus.org/browse/GEOT-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joachim Van der Auwera reopened GEOT-3062:
------------------------------------------


Stack trace when I had the problem
{code}
java.lang.AssertionError: java.lang.CloneNotSupportedException:
 org.geotools.parameter.ParameterGroup
   at org.geotools.parameter.AbstractParameter.clone(AbstractParameter.java:164)
   at org.geotools.parameter.ParameterGroup.clone(ParameterGroup.java:439)
   at org.geotools.parameter.ParameterGroup.clone(ParameterGroup.java:63)
   at 
org.geotools.referencing.operation.DefiningConversion.<init>(DefiningConversion.java:93)
   at 
org.geotools.referencing.operation.DefiningConversion.<init>(DefiningConversion.java:66)
   at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:909)
   at 
org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:222)
   at 
org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:201)
   at 
org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1088)
   at org.geotools.referencing.CRS.parseWKT(CRS.java:450)
{code}

DefiningConversion actually clones the parameters it receives (a ParameterGroup 
object). This tries to clone itself which fails.

I don't yet know why this works when included as testcase in the gt-referencing 
module, but not when used in my project. I am guessing this may be related to 
having one of the epsg modules (in my case epsg-wkt). Will try to check this. 
See the Geomoajas issue at http://jira.geomajas.org/jira/browse/MAJ-969

> CRS.parseWKT causes CloneNotSupportedException
> ----------------------------------------------
>
>                 Key: GEOT-3062
>                 URL: http://jira.codehaus.org/browse/GEOT-3062
>             Project: GeoTools
>          Issue Type: Bug
>          Components: core referencing
>    Affects Versions: 2.6.3
>            Reporter: Joachim Van der Auwera
>             Fix For: 2.6.4
>
>         Attachments: patch3062.patch
>
>
> Can be fixed by declaring "org.geotools.referencing.wkt.Formattable" as 
> "implements Cloneable".
> To reproduce, use
> {code}
> CRS.parseWKT("PROJCS[\"Google Mercator\", "
>       + "GEOGCS[\"WGS 84\", "
>       + "DATUM[\"World Geodetic System 1984\", "
>       + "SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, 
> AUTHORITY[\"EPSG\",\"7030\"]], "
>       + "AUTHORITY[\"EPSG\",\"6326\"]], "
>       + "PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], "
>       + "UNIT[\"degree\", 0.017453292519943295], "
>       + "AXIS[\"Geodetic latitude\", NORTH], "
>       + "AXIS[\"Geodetic longitude\", EAST], "
>       + "AUTHORITY[\"EPSG\",\"4326\"]],  "
>       + "PROJECTION[\"Mercator (1SP)\", AUTHORITY[\"EPSG\",\"9804\"]], "
>       + "PARAMETER[\"semi_major\", 6378137.0], "
>       + "PARAMETER[\"semi_minor\", 6378137.0], "
>       + "PARAMETER[\"latitude_of_origin\", 0.0], "
>       + "PARAMETER[\"central_meridian\", 0.0], "
>       + "PARAMETER[\"scale_factor\", 1.0],  "
>       + "PARAMETER[\"false_easting\", 0.0],  "
>       + "PARAMETER[\"false_northing\", 0.0],  "
>       + "UNIT[\"m\", 1.0],  "
>       + "AXIS[\"Easting\", EAST],  " + "AXIS[\"Northing\", NORTH], "
>       + "AUTHORITY[\"EPSG\",\"900913\"]]");
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------

_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to