[gdal-dev] GDM2000 to BRSO
Roger Loweth
roger.loweth at gmail.com
Wed Feb 2 23:42:14 EST 2011
Good morning,
Here is a code snippet I'm using in gdal-python to transform a point from
GDM2000 (geodetic) to BRSO (projected):
*"""
transform a pair of coordinates from the input CRS
to the output GEOGCS and output PROJCS
all codes are EPSG integers only
(used internally)
"""
in_CRS = osr.SpatialReference()
out_GEOGCS = osr.SpatialReference()
out_PROJCS = osr.SpatialReference()
in_CRS.ImportFromEPSG(inCRS)
out_GEOGCS.ImportFromEPSG(outGEOGCS)
out_PROJCS.ImportFromEPSG(outPROJCS)
transform = osr.CoordinateTransformation(in_CRS, out_GEOGCS)
coords = transform.TransformPoint(self.lon_value,self.lat_value)
self.latitude = coords[1]
self.longitude = coords[0]
proj_transform = osr.CoordinateTransformation(out_GEOGCS, out_PROJCS)
proj_coords = proj_transform.TransformPoint(float(self.longitude),
float(self.latitude))
self.easting = proj_coords[0]
self.northing = proj_coords[1]*
I'm using EPSG codes 4742 (GDM2000) and 3376 (BRSO) with this test point:
ϕ = 6° 52′ 42.45022″ N
λ = 116° 50′ 47.58835″ E
This should give E/N of:
793704.631 mE 762081.047 mN
but I am getting 204217.0mE 318529.9mN. I have not made any changes to the
GDAL files gcs.csv or pcs.csv
Can anyone see what mistake I am making please?
Thanks, Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110203/8431190f/attachment.html
More information about the gdal-dev
mailing list