John Dorado a écrit :
> I tried doing this:
> GeodeticDatum datum = new DefaultGeodeticDatum("CED Datum", 
> DefaultEllipsoid.SPHERE, DefaultPrimeMeridian.GREENWICH);
>             EllipsoidalCS cs = new DefaultEllipsoidalCS("CED CS", 
> DefaultCoordinateSystemAxis.LONGITUDE, 
> DefaultCoordinateSystemAxis.LATITUDE);
>            
>             return new DefaultGeographicCRS("CED", datum, cs);
> 
> and I get an error about Bursa Wolf parameters being required when I try 
> to do a reprojection.


The easiest "fix" is probably to use the DefaultGeographicCRS.WGS84 pre-defined 
constant instead. If 
a custom GeographicCRS is still wanted but no BursaWolfParemeters object can be 
supplied, then a 
workaround is to use one of the following:

     Hints hints = new Hints(Hints.LENIENT_DATUM_SHIFT, Boolean.TRUE);
     CoordinateOperationFactory factory = 
FactoryFinder.getCoordinateOperationFactory(hints);
     CoordinateOperation op = factory.createCoordinateOperation(sourceCRS, 
targetCRS);

or

     MathTransform mt = CRS.transform(sourceCRS, targetCRS, true);

        Martin.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to