[GRASS-user] Problem reprojecting to UTM 34 S

Tom Russo russo at bogodyn.org
Fri May 16 11:46:16 EDT 2008


On Fri, May 16, 2008 at 10:03:14AM +0200, we recorded a bogon-computron collision of the <r.m.krug at gmail.com> flavor, containing:
[problems reprojecting to a UTM zone in the southern hemisphere]

> >
> > If not, maybe you could try using the PROJ.4 specification for the
> > coordinate system for -t_srs instead of the EPSG number?
> >
> >  gdalwarp -t_srs '+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs' -s_srs '+proj=longlat +ellps=D_Clarke_1866 +no_defs' hak_ser2.asc hak_ser2_utm34.asc
> 
> Here are the results as suggested:
> 
> ~/> gdalwarp -s_srs '+proj=longlat +ellps=D_Clarke_1866 +no_defs'
> -t_srs '+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +
> units=m +no_defs' hak_ser2.asc hak_ser2_utm34.asc
[...]
> ~/> gdalinfo hak_ser2_utm34.asc
> Driver: GTiff/GeoTIFF
> Files: hak_ser2_utm34.asc
> Size is 1028, 880
> Coordinate System is:
> PROJCS["WGS 84 / UTM zone 34N",
>     GEOGCS["WGS 84",
>         DATUM["WGS_1984",
>             SPHEROID["WGS 84",6378137,298.2572235629972,
>                 AUTHORITY["EPSG","7030"]],
>             AUTHORITY["EPSG","6326"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4326"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",21],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","32634"]]
> 
> GDAL 1.5.0, released 2007/12/18

Ok, that sounds like a bug in gdal to me, then, because even though you've
specified "+south" in the output SRS, it's ignoring it.

When I run your upper left corner ( 15.9916667,-21.9918333 ) through 
cs2cs:

 cs2cs +proj=longlat +ellps=clrk66 +no_defs +to +proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs

it gives me very different coordinates than you're getting:
-17471.39       7559592.76 0.00

So GDAL really is using zone 34 northern hemisphere and not putting in the
correct false northing for southern hemisphere, but proj.4 does it right.

You might try posting on the gdal mailing list about that, since this isn't
really a GRASS issue.

One other possibility:  proj.4 (used by GDAL) doesn't recognize the
D_Clarke_1866 ellipsoid in its "+ellps" parameter --- I got an error message
from cs2cs when I tried to cut and paste your SRS specification.  I had to 
use "clrk66" instead.  Perhaps there's something to that --- try using 
"+ellps=clrk66" and see if it is still wrong.  If so, it's a question for
the GDAL list.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
 "It's so simple to be wise: just think of something stupid to say and
  then don't say it."  --- Sam Levinson



More information about the grass-user mailing list