[GRASS-user] Datum transformations

Paul Kelly paul-grass at stjohnspoint.co.uk
Thu Mar 15 06:07:32 EDT 2007


On Thu, 15 Mar 2007, Jose Gomez-Dans wrote:

> Hi!
> This is a GDAL-related question, but since I am also using GRASS, here
> it goes. I have a number of GeoTIFF images in UTM30N/WGS-84 format. I
> want to conver the datum to European 1950 and viceversa (in EPSG
> parlance, this is a transformation from 32630 to 23030, if memory
> serves). This is easily accomplished with gdalwarp, but I am unable to
> specify the transformation parameters for my geographic area. For
> example, if I define a region in GRASS from EPSG codes, I am asked for
> the EPSG code, as well as for which datum transformation I want to
> use. I believe this can be set in the -towgs84 paramter in GDAL, but I
> am unsure on what numbers to use for Southern Spain (in GRASS, I think
> it's either datum transform option 4 or 5 for a location defined as
> EPSG 23030). Can anyone point me to the file where these parameters
> are stored, or some other relevant info?

You can specify the projection parameters to gdalwarp in full PROJ.4 
syntax, and you can derive this from the EPSG codes using g.proj in GRASS. 
e.g.
g.proj -jf epsg=23030 datumtrans=-1
will list the possible datum transformation parameters for your location. 
>From the list you can see that parameter set number 5 is the most 
appropriate for southern Spain, so
g.proj -jf epsg=23030 datumtrans=5
will you give you the full co-ordinate system in PROJ.4 format ready to 
use with gdalwarp, i.e.
+proj=utm +no_defs +zone=30 +a=6378388 +rf=297 
+towgs84=-131,-100.3,-163.4,-1.244,-0.020,-1.144,9.39 +to_meter=1

If you don't have the latest GRASS CVS just run g.proj -jf epsg=23030 from 
a command line prompt and it will interactively prompt you for the most 
appropriate datum parameters (use the -i flag if you want to still use 
that old behaviour with the latest CVS version).

Paul




More information about the grass-user mailing list