[Proj] Coordinate transformation assistance
paul-grass at stjohnspoint.co.uk
Thu Apr 12 08:29:23 EDT 2007
On Thu, 12 Apr 2007, [iso-8859-15] Bjørn Krangnes wrote:
> 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;
> OGR.SpatialReference inp = new OGR.SpatialReference(null);
> OGR.SpatialReference outp = new OGR.SpatialReference(null);
> int stat1 = inp.ImportFromEPSG(2157); // Irish Transverse
> int stat2 = outp.ImportFromEPSG(29903); // IrishGrid75 Ireland
> OGR.CoordinateTransformation tra = new
> OGR.CoordinateTransformation(inp, outp);
> xyz = 600000.0;
> xyz = 700000.0;
> xyz = 22.22;
> 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
+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 \
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!
> I am resending this request beacuse I have not had any feedback on my
> previous request.
> 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
More information about the Proj