[Proj] Coordinate transformation assistance

Bjørn Krangnes bkr at devonor.com
Thu Apr 12 04:57:39 PDT 2007


Hi,

I am trying to go from Irish Transverse Mercator to IrishGrid75 Ireland
using GDAL C# and EPSG codes.

The code is like this:


            double[] xyz = new double[3];

            OGR.SpatialReference inp = new OGR.SpatialReference(null);
            OGR.SpatialReference outp = new OGR.SpatialReference(null);


            int stat1 = inp.ImportFromEPSG(2157);   // Irish Transverse
Mercator
            int stat2 = outp.ImportFromEPSG(29903); // IrishGrid75 Ireland

            OGR.CoordinateTransformation tra = new
OGR.CoordinateTransformation(inp, outp);

            xyz[0] = 600000.0;
            xyz[1] = 700000.0;
            xyz[2] = 22.22;

            tra.TransformPoint(xyz);

I think the problems is with ImportFromEPSG because both istat1 and istat2
is 6 after execution. How to initialize the EPSG codes ?

I am resending this request beacuse I have not had any feedback on my
previous request.

Regards

Bjørn Krangnes
Devonor AS
Telephone: +47 32 29 96 90
Direct Line: +47 32 29 96 91
Mobile: +47 45035640
E-mail: bkr at devonor.com
Web: www.devonor.com





More information about the Proj mailing list