Hello!

I'm trying to create custom crs from WKT using steps from 
http://docs.codehaus.org/display/GEOTDOC/11+Referencing+FAQ.


But after all CRS.decode(...) method throws 
org.opengis.referencing.NoSuchAuthorityCodeException .


Here is my code :

Hints hints = new Hints(Hints.CRS_AUTHORITY_FACTORY, 
PropertyAuthorityFactory.class);
ReferencingFactoryContainer referencingFactoryContainer = 
ReferencingFactoryContainer.instance(hints);
PropertyAuthorityFactory factory = new PropertyAuthorityFactory(
                    referencingFactoryContainer,
                    Citations.fromName("CUSTOM"),
                    new URL("file:/d:/wkt.txt")
            );      
ReferencingFactoryFinder.addAuthorityFactory(factory);
CoordinateReferenceSystem s = CRS.decode("CUSTOM:0001");

And my WKT definition (just WGS84 / Simple Mercator clone):

PROJCS["CUSTOM", 
  GEOGCS["WGS 84", 
    DATUM["WGS_1984", 
      SPHEROID["GRS 1980", 6378137.0, 298.257222101], 
      TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]], 
    PRIMEM["Greenwich", 0.0], 
    UNIT["degree", 0.017453292519943295], 
    AXIS["Longitude", EAST], 
    AXIS["Latitude", NORTH]], 
  PROJECTION["Mercator_1SP"], 
  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["x", EAST], 
  AXIS["y", NORTH], 
  AUTHORITY["CUSTOM","0001"]]


I would be appriciate fro any help.
Thanks





-- 
View this message in context: 
http://n2.nabble.com/Custom-CRS-registration-tp2562095p2562095.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to