[gdal-dev] Problem reprojecting Clark 1866 to UTM 34 South

Rainer M Krug r.m.krug at gmail.com
Mon May 19 05:00:51 EDT 2008


I did some more trying and I found the following:
If I convert it to a geotiff, it works, but to a .asc, it doesn't.
Even converting the geotif to an .asc, it changes from PROJCS["WGS 84
/ UTM zone 34S" to PROJCS["WGS 84 / UTM zone 34N" (output below).

Can somebody confirm that as a bug?

Rainer


> gdalwarp -s_srs '+proj=longlat +ellps=clrk66 +no_defs' -t_srs '+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs' hak_ser2.asc hak_ser2_utm34.tif

> gdalinfo hak_ser2_utm34.tif
Driver: GTiff/GeoTIFF
Files: hak_ser2_utm34.tif
Size is 1028, 880
Coordinate System is:
PROJCS["WGS 84 / UTM zone 34S",
    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",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32734"]]
Origin = (-17476.813424218373257,7568238.577940721064806)
Pixel Size = (1715.257886354814218,-1715.257886354814218)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  -17476.813, 7568238.578) ( 15d59'39.65"E, 21d54'50.47"S)
Lower Left  (  -17476.813, 6058811.638) ( 15d17'55.46"E, 35d28'46.08"S)
Upper Right ( 1745808.294, 7568238.578) ( 32d58'4.10"E, 21d33'14.79"S)
Lower Right ( 1745808.294, 6058811.638) ( 34d34'58.31"E, 34d50'42.45"S)
Center      (  864165.740, 6813525.108) ( 24d43'43.18"E, 28d45'15.64"S)
Band 1 Block=1028x1 Type=Float32, ColorInterp=Gray

> gdalwarp hak_ser2_utm34.tif 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"]]
Origin = (-17471.391705359546904,-2431926.174459759611636)
Pixel Size = (1715.270741799227608,-1715.270741799227608)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  -17471.392,-2431926.174) ( 15d59'39.65"E, 21d54'55.81"S)
Lower Left  (  -17471.392,-3941364.427) ( 15d17'55.27"E, 35d28'51.77"S)
Upper Right ( 1745826.931,-2431926.174) ( 32d58'5.17"E, 21d33'19.99"S)
Lower Right ( 1745826.931,-3941364.427) ( 34d34'59.95"E, 34d50'47.92"S)
Center      (  864177.770,-3186645.301) ( 24d43'43.82"E, 28d45'21.15"S)
Band 1 Block=1028x1 Type=Float32, ColorInterp=Gray


On Mon, May 19, 2008 at 9:56 AM, Rainer M Krug <r.m.krug at gmail.com> wrote:
> On Sat, May 17, 2008 at 10:40 PM, Frank Warmerdam <warmerdam at pobox.com> wrote:
>> Rainer M Krug wrote:
>>>
>>> Hi
>>>
>>> I have a ESRI asc raster in +proj=longlat +ellps=D_Clarke_1866 +no_defs
>>
>> ...
>>>
>>> I want to reproject / warp it into UTM 34 S. I use the following command:
>>>
>>> gdalwarp -s_srs '+proj=longlat +ellps=D_Clarke_1866 +no_defs' -t_srs
>>> EPSG:32734 hak_ser2.asc hak_ser2_utm34.asc
>>>
>>> where EPSG:32734 is the definition for UTM 34 S WGS 84
>>>
>>> But I get:
>>>
>>> rkrug at ecolmod1:~/Documents/Projects/AlienSpread/GIS.local/Rainer_subset>
>>> 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",
>>
>> Rainer,
>>
>> I suspect there is a problem with finding some of the support libgeotiff
>> or GDAL coordinate system files.
>>
>> Do you have files in /usr/local/share/epsg_csv?
>>
>> Do you have files in /usr/local/share/gdal?
> A file named gdal_datum.csv in /usr/local/share and
> a grass folder
>
> Are there any specific files I have to look for?
>
> I have the following files with epsg:
>
>> locate epsg
> /opt/grass/etc/epsg_option.tcl
> /usr/lib/R/library/rgdal/gdal/epsg.wkt
> /usr/lib/R/library/rgdal/proj/epsg
> /usr/local/GeoExpressSDK/3rd-party/share/gdal/epsg.wkt
> /usr/local/share/epsg.wkt
> /usr/local/share/proj/epsg
> /usr/share/proj/epsg
>
>
>>
>> I tried a similar command and the South aspect was properly preserved, so
>> I'm getting that when the support files are not found (either by libgeotiff
>> or GDAL) the fallback logic mishandles the south modifier.
>>
>> PS. +ellps=D_Clark_1866 isn't likely to be recognised.  Use +ellps=clrk66.
>>
>> Best regards,
>> --
>> ---------------------------------------+--------------------------------------
>> I set the clouds in motion - turn up   | Frank Warmerdam,
>> warmerdam at pobox.com
>> light and sound - activate the windows | http://pobox.com/~warmerdam
>> and watch the world go round - Rush    | President OSGeo, http://osgeo.org
>>
>>
>
>
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Plant Conservation Unit
> Department of Botany
> University of Cape Town
> Rondebosch 7701
> South Africa
>



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa


More information about the gdal-dev mailing list