2014-06-20 8 views
0

EPSG에서 좌표를 변환하는 방법 : 54003 in EPSG : 4326? ESRI:54003 CRS 코드는 내가Geotools 좌표 변형

org.opengis.referencing.NoSuchIdentifierException: No transform for classification "Miller_Cylindrical". 
at org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:290) 
at org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:316) 
at org.geotools.referencing.wkt.Parser.parseProjection(Parser.java:603) 
at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:917) 
at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:225) 
at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:204) 
at org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1090) 
at ru.oogis.bank.sxf.TestCRS.main(TestCRS.java:25) 
org.opengis.referencing.FactoryException: Error in "PROJECTION": No transform for classification "Miller_Cylindrical". 
at org.geotools.referencing.factory.PropertyAuthorityFactory.createCoordinateReferenceSystem(PropertyAuthorityFactory.java:399) 
at org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateReferenceSystem(BufferedAuthorityFactory.java:783) 
at org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:644) 
at org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:644) 
at org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:644) 
at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:801) 
at org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:731) 
at org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179) 
at org.geotools.referencing.CRS.decode(CRS.java:519) 
at org.geotools.referencing.CRS.decode(CRS.java:447) 
at ru.oogis.bank.sxf.TestCRS.main(TestCRS.java:36) 
Caused by: java.text.ParseException: Error in "PROJECTION": No transform for classification "Miller_Cylindrical". 
at org.geotools.referencing.wkt.Parser.parseProjection(Parser.java:605) 
at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:917) 
at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:225) 
at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:204) 
at org.geotools.referencing.factory.PropertyAuthorityFactory.createCoordinateReferenceSystem(PropertyAuthorityFactory.java:396) 
... 10 more 
Caused by: org.opengis.referencing.NoSuchIdentifierException: No transform for classification "Miller_Cylindrical". 
at org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:290) 
at org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:316) 
at org.geotools.referencing.wkt.Parser.parseProjection(Parser.java:603) 
... 14 more 
org.opengis.referencing.NoSuchAuthorityCodeException: Authority "ESRI" is unknown or doesn't match the supplied hints. Maybe it is defined in an unreachable JAR file? 
at org.geotools.referencing.factory.ManyAuthoritiesFactory.noSuchAuthority(ManyAuthoritiesFactory.java:489) 
at org.geotools.referencing.factory.ManyAuthoritiesFactory.getAuthorityFactory(ManyAuthoritiesFactory.java:467) 
at org.geotools.referencing.factory.ManyAuthoritiesFactory.getCRSAuthorityFactory(ManyAuthoritiesFactory.java:548) 
at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:801) 
at org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:731) 
at org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179) 
at org.geotools.referencing.CRS.decode(CRS.java:519) 
at org.geotools.referencing.CRS.decode(CRS.java:447) 
at ru.oogis.bank.sxf.TestCRS.main(TestCRS.java:46) 

수신에 다음 코드 치어의

CoordinateReferenceSystem WORLDCRS = DefaultGeographicCRS.WGS84; 
String wkt = "PROJCS[\"World_Miller_Cylindrical\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Miller_Cylindrical\"],PARAMETER[\"False_Easting\",0],PARAMETER[\"False_Northing\",0],PARAMETER[\"Central_Meridian\",0],UNIT[\"Meter\",1],AUTHORITY[\"EPSG\",\"54003\"]]"; 
    CoordinateReferenceSystem crs; 
    MathTransform transform; 
    try 
    { 
     crs = crsFactory.createFromWKT(wkt); 
     transform = CRS.findMathTransform(crs, WORLDCRS, true); 
     System.out.println(transform.toWKT()); 
     System.out.println(transform.getClass().getCanonicalName()); 
    } 
    catch (Exception e) 
    { 
     e.printStackTrace(); 
    } 
    try 
    { 
     transform = CRS.findMathTransform(CRS.decode("EPSG:54003"), WORLDCRS, true); 
     System.out.println(transform.toWKT()); 
     System.out.println(transform.getClass().getCanonicalName()); 
    } 
    catch (Exception e) 
    { 
     e.printStackTrace(); 
    } 
    try 
    { 
     transform = CRS.findMathTransform(CRS.decode("ESRI:54003"), WORLDCRS, true); 
     System.out.println(transform.toWKT()); 
     System.out.println(transform.getClass().getCanonicalName()); 
    } 
    catch (Exception e) 
    { 
     e.printStackTrace(); 
    }` 

설정 종속 응답

<dependency> 
     <groupId>org.geotools</groupId> 
     <artifactId>gt-epsg-extension</artifactId> 
     <version>11.1</version> 
     <scope>compile</scope> 
    </dependency> 

를 사용할 수 있습니까?

+0

어떤 블록 (또는 블록)이 예외를 throw하는지 명확하지 않습니다. –

+0

모든 블록이 예외를 throw합니다. 블록 변환을 사용하여 보여줄 수 있습니다. – DenLarik

답변

1

지오 툴즈는 ESRI:54003 CRS를 알지 못합니다.
대신 EPSG:54003 또는 다른 CRS를 사용해야합니다.

+0

Geotools가 투영기에서 전혀 작동하지 않습니다. – DenLarik