Hi all,

I have an urgent problem. I need to get the transformation from WGS84 
coordination comming from a GPS reciever working. I'm doing the following 
right now:

1. Step:
Get the target CS via

------------------------------------------------------
String wkt = "PROJCS[\"GK_Zone_3N\", "
                    + "GEOGCS[\"DE_DHDN\", "
                        + "DATUM[\"DE_DHDN\", "
                        + "SPHEROID[\"Bessel 1841\", 6377397.155, 299.15281285, 
AUTHORITY[\"EPSG\",\"31467\"]], "
                        + "TOWGS84[-231.89,101.34,27.23,-0.61,0.17,-0.93,1.84], 
AUTHORITY[\"EPSG\",\"6326\"]], "
                        + "PRIMEM[\"Greenwich\", 0.0], "
                        + "UNIT[\"degree\",0.017453292519943295], "
                        + "AXIS[\"Longitude\",EAST], "
                        + "AXIS[\"Latitude\",NORTH]], "
                    + "PROJECTION[\"Transverse_Mercator\"], "
                    + "PARAMETER[\"semi_major\", 6377397.1550], "
                    + "PARAMETER[\"semi_minor\", 6356078.9633], "
                    + "PARAMETER[\"central_meridian\", 9], "
                    + "PARAMETER[\"latitude_of_origin\", 0.0], "
                    + "PARAMETER[\"scale_factor\", 1.0], "
                    + "PARAMETER[\"false_easting\", 4300000.0], "
                    + "PARAMETER[\"false_northing\", 0.0], "
                    + "UNIT[\"metre\",1.0], "
                    + "AXIS[\"x\",EAST], "
                    + "AXIS[\"y\",NORTH]]";
        
CoordinateSystemFactory csFactory = CoordinateSystemFactory.getDefault();
CoordinateSystem targetCS = csFactory.createFromWKT(wkt);
------------------------------------------------------

2. Step:
Get the source CS via

------------------------------------------------------
CoordinateSystem sourceCS = GeographicCoordinateSystem.WGS84;
------------------------------------------------------

3. Step:
Get the MathTransformation

------------------------------------------------------
CoordinateTransformationFactory trFactory = 
CoordinateTransformationFactory.getDefault();
CoordinateTransformation tr = trFactory.createFromCoordinateSystems(sourceCS, 
targetCS);
------------------------------------------------------


4. Step:
Do the transformation:

------------------------------------------------------
MathTransform transform1 = tr.getMathTransform();
point2 = transform1.transform(point1, point2);
------------------------------------------------------

But the resulting coordinates differ from the ones that should result.

Can anyone of you tell me if there is a problem the way I'm thinking or is it 
a bug within geotools?

-- 
With kind regards

Michael Duergner
Student
Department of Computer Science (http://www.ifi.lmu.de)
Ludwig-Maximilians University Munich
Center for Digital Technology and Management (http://www.cdtm.de)
Ludwig-Maximilians University and Technical University Munich


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to