Hi all,

I am trying to use the WinkelTripel projection but I can't get a CRS when
parsing the WKT.

Running this simple example:

public static void main(String[] args) throws FactoryException {
  CoordinateReferenceSystem crs = CRS.parseWKT(
    new 
org.geotools.referencing.operation.projection.WinkelTripel.WinkelProvider().toWKT());
}

Results in this exception:

Exception in thread "main" org.opengis.referencing.FactoryException:
Type "PROJECTION" is unknow in this context.

        at 
org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1096)
        at org.geotools.referencing.CRS.parseWKT(CRS.java:535)
        at 
org.gbif.maps.common.projection.WinkelTripel.main(WinkelTripel.java:20)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.text.ParseException: Type "PROJECTION" is unknow in
this context.
        at 
org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:236)
        at 
org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:204)
        at 
org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1090)
        ... 7 more


Can anyone please tell me what I am doing wrong, using geotools 15.0?
My pom looks like this:

<dependency>
  <groupId>org.geotools</groupId>
  <artifactId>gt-geometry</artifactId>
  <version>${geotools.version}</version>
</dependency>
<dependency>
  <groupId>org.geotools</groupId>
  <artifactId>gt-epsg-hsql</artifactId>
  <version>${geotools.version}</version>
</dependency>
<dependency>
  <groupId>org.geotools</groupId>
  <artifactId>gt-render</artifactId>
  <version>${geotools.version}</version>
</dependency>


Many thanks,

Tim
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to