[Proj] Coordinate transformation assistance

Paul Kelly paul-grass at stjohnspoint.co.uk
Thu Apr 12 05:29:23 PDT 2007


On Thu, 12 Apr 2007, [iso-8859-15] Bjørn Krangnes wrote:

> 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 ?

What is the problem?
(Sorry I can't help with C-sharp stuff anyway but here's something else 
that may be important:)
Those codes should work but to be clearer about what you're doing it is 
more obvious to enter the projection in PROJ.4 syntax IMHO. In particular, 
Irish Transverse Mercator uses the WGS84 ellipsoid while Irish Grid uses 
the Modified Airy, so you will need some datum transformation parameters 
with the Irish Grid projection to get an accurate transformation. I 
suggest:

+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 \
+no_defs +a=6377340.189 +rf=299.3249646 \
+towgs84=482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15 +to_meter=1

Those parameters are published by both Ordnance Surveys (ROI & NI) as 
having an accuracy of approx. 0.4m throughout Ireland.

Interesting anyway; I didn't know anybody was actually using Irish 
Transverse Mercator for anything yet!

Paul

>
> 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
>
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>


More information about the Proj mailing list