<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>I'm unable to get Proj to correctly return lat/long coordinates from Mercator41 data.<br>http://www.spatialreference.org/ref/epsg/3994/ does not list any proj4 string, Postgis proj4text or Mapserver values for this projection.<br><br>I have an ESRI binary grid with a projection definition (prj.adf) of:<br><br>Projection MERCATOR<br>Datum WGS84<br>Spheroid WGS84<br>Units METERS<br>Zunits NO<br>Xshift 0.0<br>Yshift 0.0<br>Parameters <br> 100 0 0.0 /* longitude of central meridian<br> -41 0 0.0 /* latitude of true scale<br>0.0 /* false
easting (meters)<br>0.0 /* false northing (meters)<br><br>gdalinfo fails to interpret this correctly, giving:<br><br>gdalinfo w001001.adf <br>Driver: AIG/Arc/Info Binary Grid<br>Files: .<br> ./#m41_to_ll#<br> ./sta.adf<br> ./w001001x.adf<br> ./hdr.adf<br> ./w001001.adf<br> ./m41_to_ll<br> ./whbr<br> ./prj.adf<br> ./dblbnd.adf<br>Size is 8817, 7901<br>Coordinate System is:<br>PROJCS["unnamed",<br> GEOGCS["WGS 84",<br> DATUM["WGS_1984",<br> SPHEROID["WGS
84",6378137,298.257223563,<br> AUTHORITY["EPSG","7030"]],<br> TOWGS84[0,0,0,0,0,0,0],<br> AUTHORITY["EPSG","6326"]],<br> PRIMEM["Greenwich",0,<br> AUTHORITY["EPSG","8901"]],<br> UNIT["degree",0.0174532925199433,<br> AUTHORITY["EPSG","9108"]],<br> AUTHORITY["EPSG","4326"]],<br> PROJECTION["Mercator_1SP"],<br> PARAMETER["latitude_of_origin",100],<br> PARAMETER["central_meridian",0],<br>
PARAMETER["scale_factor",1],<br> PARAMETER["false_easting",-41],<br> PARAMETER["false_northing",0],<br> UNIT["METERS",1]]<br>Origin = (6199987.499999998137355,-3709987.500002769753337)<br>Pixel Size = (25.000000000000000,-25.000000000000000)<br>Corner Coordinates:<br>Upper Left ( 6199987.500,-3709987.500) <br>Lower Left ( 6199987.500,-3907512.500) <br>Upper Right ( 6420412.500,-3709987.500) <br>Lower Right ( 6420412.500,-3907512.500) <br>Center ( 6310200.000,-3808750.000) <br>Band 1 Block=256x4 Type=Float32, ColorInterp=Undefined<br> Min=-2570.453 Max=2917.197 <br> NoData Value=-3.4028234663852886e+38<br><br>With some obvious errors, like latitude of origin = 100... so just extracting the xyz values & trying to reproject with proj, I'm having problems.<br><br>I tried: g dal2xyz.py w001001.adf | head <br>which returns:<br>6200000.000
-3710000.000 76.1574<br>6200025.000 -3710000.000 76.1842<br>...<br><br>which seems to work fine, but when I pass these Mercator41 coordinates into proj I'm unable to get a parameter list which gives the lat/long values for where I know these data sit. There is an offset of many miles. This suggests either my source data has an error in the coordinates (unlikely) or I don't understand enough about proj parameters (more likely)<br><br>Based on the contents of the above prj.adf file I have tried the following command:<br><br>echo "6200000.000 -3710000.000" | proj -If "%.5f" +proj=merc +lon_0=100 +lat_ts=-41 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs +to +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs<br>173.69093 -40.48353<br><br>I expected values around 174.66 -41.41 (the data is a 25m multibeam bathymetry grid around Cook Strait, between the North & South Islands of New Zealand)
<br><br><br>Any advice appreciated.<br><br> Brent Wood<br><br><br><br> <br>
</td></tr></table>