[GRASS5] Re: [bug #1492] (grass) r.in.gdal/GRASS/GDAL: coordinates

On Sun, Dec 22, 2002 at 06:38:15PM +0100, Request Tracker wrote:

Hi

This is not unique to GDAL, other software such as ARC/INFO and ERDAS Imagine also define
UTM for the Southern Hemisphere differently. One should just be aware of this and be able
to edit the coordinates of a raster file or imagery group, later on.

Hi Wolfgang, hi all,

perhaps we should modify r.in.gdal to take care of this modification
automagically (in case GDAL send a negative UTM zone)?

But I just see that *GDAL* gets it wrong:

gdalinfo p174r73_5t900416_nn1.tif
Driver: GTiff/GeoTIFF
Size is 8191, 7172
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"]],
    AUTHORITY["EPSG","32634"],
    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"]]]
Origin = (701128.500000,-1977985.500000)
Pixel Size = (28.500000,-28.500000)
Corner Coordinates:
Upper Left ( 701128.500,-1977985.500) ( 22d53'54.03"E, 17d52'49.72"S)
Lower Left ( 701128.500,-2182387.500) ( 22d55'9.01"E, 19d43'36.50"S)
Upper Right ( 934572.000,-1977985.500) ( 25d 5'55.19"E, 17d50'47.82"S)
Lower Right ( 934572.000,-2182387.500) ( 25d 8'36.64"E, 19d41'21.06"S)
Center ( 817850.250,-2080186.500) ( 24d 0'54.24"E, 18d47'20.73"S)
Band 1 Block=8191x1 Type=Byte, ColorInterp=Gray
  Overviews: 1024x897

LANDSAT 173/73 is in Botswana, so GDAL should report UTM zone 34S.

I'll post this to the GDAL bugtracker.

Markus

> this bug's URL: http://intevation.de/rt/webrt?serial_num=1492
> -------------------------------------------------------------------------
>
> Subject: r.in.gdal/GRASS/GDAL: coordinates confusion on southern hemisphere (UTM)
>
> grass binary for platform: Compiled from Sources
>
> Hi,
>
> when importing a LANDSAT-TM5 into GRASS
> Botswana, UTM Zone 35
> with r.in.gdal,I get a coordinates confusion.
> A sample dataset is here:
>
ftp://ftp.glcf.umiacs.umd.edu/glcf/Landsat/WRS2/p173/r072/p173r72_5t890625.TM-EarthSat-Orthorectified/

>
> (get the 1st channel, Geotiff).
>
> After importing the TM1 channel, the cell header contains:
> proj: 1
> zone: 35
> north: -1818499.5
> south: -2018512.5
> east: 499120.5
> west: 269040
> cols: 8073
> rows: 7018
> e-w resol: 28.5
> n-s resol: 28.5
> format: 0
> compressed: 1
>
> But the region definition in "GRASS speak" is for a southern hemisphere
> area:
> g.region -pd
> projection: 1 (UTM)
> zone: -35
> datum: ** unknown (default: WGS84) **
> ellipsoid: wgs84
> north: 8230695
> south: 7629900
> west: 3600
> east: 525060
> nsres: 15
> ewres: 15
> rows: 40053
> cols: 34764
>
> Note (the boundary coordinates are not fully overlapping):
> - negative zone (GRASS) vs positive zone (GDAL)
> - positive N/S coordinates (GRASS) vs negative N/S coordinates (GDAL)
>
> Do we have to fix that in GDAL or in r.in.gdal or is the convention
> in GRASS for southern hemisphere bad? If the latter, how to solve the
> problem (I have several data sets...).
>
> Thanks,
>
> Markus
>
>
> -------------------------------------------- Managed by Request Tracker
>
> _______________________________________________
> grass5 mailing list
> grass5@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5

---------------------------------------------
This message was sent using M-Web Airmail.
JUST LIKE THAT
Are you ready for 10-digit dialling?
To find out how this will affect your Internet connection go to www.mweb.co.za/ten
http://airmail.mweb.co.za/

--- Headers Follow ---

>From wolfluck@mweb.co.za Sun Dec 22 18:38:12 2002
Return-Path: <wolfluck@mweb.co.za>
Delivered-To: grass-bugs@lists.intevation.de
Received: from mail.intevation.de (aktaia [212.95.126.10])
  by lists.intevation.de (Postfix) with ESMTP id D2C8C13942
  for <grass-bugs@lists.intevation.de>; Sun, 22 Dec 2002 18:38:12 +0100 (CET)
Received: from rammstein.mweb.co.za (rammstein.mweb.co.za [196.2.53.175])
  by mail.intevation.de (Postfix) with ESMTP id E71B51C7F5
  for <grass-bugs@intevation.de>; Sun, 22 Dec 2002 18:38:09 +0100 (CET)
Received: from air.mweb.co.za ([196.2.53.154] helo=Debug)
  by rammstein.mweb.co.za with smtp (Exim 3.33 #1)
  id 18Q9rL-0003IT-00
  for grass-bugs@intevation.de; Sun, 22 Dec 2002 19:25:51 +0200
To: Request Tracker <grass-bugs@intevation.de>
From: wolfluck@mweb.co.za
Subject: Re: [GRASS5] [bug #1492] (grass) r.in.gdal/GRASS/GDAL: coordinates
Date: Sun, 22 Dec 2002 17:38:05 GMT
X-Posting-IP: 196.44.133.64
X-Mailer: Endymion MailMan
Message-Id: <E18Q9rL-0003IT-00@rammstein.mweb.co.za>
X-Spam-Status: No, hits=1.6 required=5.0
  tests=NO_REAL_NAME,QUOTED_EMAIL_TEXT,SPAM_PHRASE_03_05
  version=2.43
X-Spam-Level: *

-------------------------------------------- Managed by Request Tracker

--
Markus Neteler

ITC-irst, Istituto per la Ricerca Scientifica e Tecnologica
      Project on Predictive Models for the Environment
Via Sommarive, 18 - 38050 Povo (Trento), Italy
tel +39 0461 314 520 (fax -591) http://mpa.itc.it