[Gdal-dev] Defining Australian Map Grid in GDAL

Delfos, Jacob jacob.delfos at maunsell.com
Wed Mar 1 18:48:56 EST 2006


Andrew,

Theoretically, if you replace the incorrect lines in your EPSG
projection file (\proj\nad\epsg), then I believe you could do this:

gdalwarp -s_srs epsg:20255 -t_srs epsg:4326 -co "TFW=YES" image_in.tif
image_out.tif

As far as I can tell, that ought to work (and override the source
projection). There's a good chance your image does not in fact have a
datum defined, and it just defaults to WGS84.

Alternatively, you could use the parameters:

gdalwarp -s_srs "+proj=utm +zone=55 +south +a=6378160
+rf=298.250000000055
+towgs84=-129.193,-41.212,130.73,-0.246,-0.374,-0.329,-2.955 +units=m"
-t_srs "+proj=longlat +ellps=WGS84 +datum=WGS84" -co "TFW=YES"
image_in.tif image_out.tif

I'm no export on gdalwarp, so this may not work :)

Regards,

Jacob


 

> -----Original Message-----
> From: Andrew Williams [mailto:awilliams at rapidmap.com.au] 
> Sent: 1 March 2006 14:22
> To: Delfos, Jacob
> Cc: gdal-dev at lists.maptools.org
> Subject: RE: [Gdal-dev] Defining Australian Map Grid in GDAL
> 
> OK I've narrowed it down. Jacob is correct, there is a 
> problem handling AGD datums. With the TFW file in the same 
> directory as the source image I've attenpted to translate the 
> image using the following command line
>  
> gdalwarp -s_srs "+proj=utm +zone=55 +south +a=6378160 
> +rf=298.250000000055" -t_srs "+proj=latlong +datum=WGS84" -co 
> "TFW=YES" image_in.tif image_out.tif
>  
> What is happening is that the system is being converted from 
> grid to latlong but the source datum is still adopting WGS84. 
> Therefore 200 odd metres out when computed to latlong.
>  
> I have checked the varios csv's such as gcs, pcs, datum and 
> ellipsoid and the correct parameter appear to be in place.
>  
> The TFW only defines the top left corner of the image and the 
> pixel dimension. Why would GDAL assume WGS84 when I have 
> defined override parameters?
>  
> Do I need to take Jacob's file and insert it into one of 
> these other csv's? Any other ideas?
>  
> regards
> Andrew
> 
> 	-----Original Message----- 
> 	From: Delfos, Jacob [mailto:jacob.delfos at maunsell.com] 
> 	Sent: Wed 3/1/2006 11:02 AM 
> 	To: Andrew Williams 
> 	Cc: gdal-dev at lists.maptools.org 
> 	Subject: RE: [Gdal-dev] Defining Australian Map Grid in GDAL
> 	
> 	
> 
> 	Andrew, 
> 
> 	You have to be careful with AGD-based projections in 
> Proj4, because the definitions that exist in Proj4 are not 
> correct (problem with datums). I'm attaching a file with 
> correct definitions for AGD-based projections. I have myself 
> spent several days trying to figure out why my coordinates 
> were up to 200m off, only to realise that Proj4 does not 
> appear to use the AGD84 and AGD66 datum correctly.
> 
> 	Just for the record: 
> 	AMG66 = UTM + AGD66-datum 
> 	AMG84 = UTM + AGD84-datum 
> 	MGA94 = UTM + GDA94-datum (where GDA94 can be 
> substituted with WGS84) 
> 
> 	Be careful with the acronyms. You wouldn't be the first 
> to start construction in the wrong spot :) 
> 	For your image, I guess just override the projection, 
> and project from Latlong AGD84 (epsg:4203, bottom of file I 
> sent) to Latlong WGS84.
> 
> 	Regards, 
> 
> 	Jacob 
> 	  
> 
> 	JACOB DELFOS
> 	GIS ANALYST
> 	Maunsell Australia Pty Ltd
> 	629 Newcastle Street, Leederville, WA 6007 
> 	PO Box 81, Leederville, WA 6902 
> 	Western Australia 
> 	ABN 20 093 846 925
> 	
> 	Tel     + 61 8 9281 6185
> 	Fax    + 61 8 9281 6297
> 	jacob.delfos at maunsell.com 
> 
> 	<<agd84_agd66_proj4.txt>> 
> 
> 	> -----Original Message----- 
> 	> From: gdal-dev-bounces at lists.maptools.org 
> 	> [mailto:gdal-dev-bounces at lists.maptools.org 
> <mailto:gdal-dev-bounces at lists.maptools.org> ] On Behalf Of 
> 	> Andrew Williams 
> 	> Sent: 28 February 2006 22:27 
> 	> To: gdal-dev at lists.maptools.org 
> 	> Subject: [Gdal-dev] Defining Australian Map Grid in GDAL 
> 	> 
> 	> Hello folks. 
> 	> I'm having trouble with a Geotiff. 
> 	> The scan is a topographic map sheet. The cartography and grid 
> 	> on the sheet is based on AMG (Australian Map Grid). It is a 
> 	> UTM projection based on the Australian National Spheroid, 
> 	> ellps=aust_SA I believe. 
> 	>  
> 	> My problem is that the GeoTiff has been georefernced as UTM 
> 	> ellps=GRS80 datum=WGS84 incorrectly. 
> 	>  
> 	> My intent is to gdalwarp the image to latlong WGS84. 
> 	>  
> 	> I have tried for the better part of a day to attempt to 
> 	> override or otherwise correct the georeferncing. 
> Without success. 
> 	>  
> 	> I have been very successful with GDAL in the past, but this 
> 	> has stopped me. 
> 	>  
> 	> The problem is that I can't seem to fully define AMG "enough" 
> 	> to allow GDALwarp to reproject the image. It seems to default 
> 	> to the source as being UTM WGS84. 
> 	>  
> 	> I attempted to gdal_translate the image using the corrected 
> 	> definition and then gdalwarp image, but that also failed. 
> 	>  
> 	> the definition I have been using is "+proj=tmerc 
> 	> +ellps=aust_SA +lat_0=0 +lon_0=147 +x_0=500000 +y_0=10000000 
> 	> +k=0.9996 +south" 
> 	>  
> 	> regards 
> 	> Andrew 
> 	> 
> 	> _______________________________________________ 
> 	> Gdal-dev mailing list 
> 	> Gdal-dev at lists.maptools.org 
> 	> http://lists.maptools.org/mailman/listinfo/gdal-dev 
> <http://lists.maptools.org/mailman/listinfo/gdal-dev>  
> 	> 
> 
> 




More information about the Gdal-dev mailing list