Hello
I begin to use GeoTools to create projections described in WKF format in order
to proceed tranformations ;
but to achieve this, it seems that I can't avoid the library
gt-epsg-hsql-2.6.3.jar
while I think that gt-referencing-2.6.3.jar was enough ;
as an example I give you the code below which works fine if I add
gt-epsg-hsql-2.6.3.jar
// transformation WGS 84 --> French Lambert zone II
double Longitude=1.515; double Latitude=46.675 ;
String wktsrc="GEOGCS[\"WGS 84\", DATUM[\"World Geodetic System 1984\",....";
String wktdst="PROJCS[\"NTF (Paris) / Lambert zone II\",GEOGCS[\"NTF
(Paris)\",.....";
CoordinateReferenceSystem crsSrc = CRS.parseWKT(wktsrc);
CoordinateReferenceSystem crsDest = CRS.parseWKT(wktdst);
CoordinateOperation op = coFactory.createOperation(crsSrc, crsDest);
MathTransform mathtransform = op.getMathTransform();
DirectPosition SourcePoint = new GeneralDirectPosition(Latitude, Longitude);
DirectPosition TargetPoint = transform.transform(SourcePoint, null);
double[] targetpoints=TargetPoint.getCoordinate();
System.out.println("targetpoints[0] = "+targetpoints[0]+" - targetpoints[1] =
"+targetpoints[1]);
// result : targetpoints[0] = 537147.7249074522 - targetpoints[1] =
2186440.6138260444 (ok)
If I don't use library gt-epsg-hsql-2.6.3.jar I get the following error :
org.opengis.referencing.operation.OperationNotFoundException: Les paramètres de
Bursa Wolf sont requis.
at
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1072)
at
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1165)
at
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:882)
at
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:965)
at
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:243)
at
org.geotools.referencing.operation.BufferedCoordinateOperationFactory.createOperation(BufferedCoordinateOperationFactory.java:254)
at TestGeoToolsWKT.<init>(TestGeoToolsWKT.java:27)
at TestGeoToolsWKT.main(TestGeoToolsWKT.java:46)
line 27 corresponds to :
CoordinateOperation op = coFactory.createOperation(crsSrc, crsDest);
my question is : can gt-epsg-hsql-2.6.3.jar be replaced by another GooTools
library ?
it is crucial for us as gt-epsg-hsql-2.6.3.jar is too big in our context
thanks for your help
Jean-Marie
_________________________________________________________________
Découvrez Windows Phone 7 : Une nouvelle ère de téléphones !
http://www.microsoft.com/windowsmobile/fr-fr/cmpn1/windowsphone7series/default.mspx------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users