[GRASS5] Problems with UTM/southern hemisphere

Hi,

a colleague of mine from Argentina is facing problems
to import LANDSAT data in UTM.

Displaying a map leads to:

GRASS 5.7.cvs > d.rast markus.1
WARNING: [markus.1] in mapset [beinlich] - in different zone [20] than
         current region [-20]
WARNING: unable to open raster map [markus.1 in beinlich]
ERROR: Not able to open cellfile for [markus.1]

The location is defined as (UTM, southern hemisphere):

GRASS 5.7.cvs > cat WIND
proj: 1
zone: -20
north: 6422700
south: 6285990
east: 5509920
west: 5368500
cols: 4714
rows: 4557
e-w resol: 30
n-s resol: 30
Mapset <beinlich> in Location <rosarioutm>

Looking at the map header:

GRASS 5.7.cvs > cd cellhd/
GRASS 5.7.cvs > cat markus.1
proj: 1
zone: 20 <-- shouldn't this be -20?
north: 6362801.5
south: 6341626
east: 726550.5
west: 703978.5
cols: 792
rows: 743
e-w resol: 28.5
n-s resol: 28.5
format: 0
compressed: 1

GRASS 5.7.cvs > g.proj -p
-PROJ_INFO-------------------------------------------------
name : UTM
datum : wgs84
towgs84 : 0.000,0.000,0.000
proj : utm
ellps : wgs84
a : 6378137.0000000000
es : 0.0066943800
f : 298.2572235630
zone : 20 <- positive, but
south : defined <- southern hemisphere indication
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1.0

GRASS 5.7.cvs > g.proj -w
PROJCS["UTM Zone 20, Southern Hemisphere",
    GEOGCS["wgs84",
        DATUM["WGS_1984",
            SPHEROID["wgs84",6378137,298.257223563],
            TOWGS84[0.000,0.000,0.000]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-63],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["meter",1]]

May it be possible that G_get_projinfo() doesn't understand
well that 'south' is defined?

Mhh, probably I have to debug a bit.

Markus

Hello Markus

On Thu, 14 Oct 2004, Markus Neteler wrote:

Hi,

a colleague of mine from Argentina is facing problems
to import LANDSAT data in UTM.

Displaying a map leads to:

GRASS 5.7.cvs > d.rast markus.1
WARNING: [markus.1] in mapset [beinlich] - in different zone [20] than
        current region [-20]
WARNING: unable to open raster map [markus.1 in beinlich]
ERROR: Not able to open cellfile for [markus.1]

The location is defined as (UTM, southern hemisphere):

[...]

Looking at the map header:

GRASS 5.7.cvs > cd cellhd/
GRASS 5.7.cvs > cat markus.1
proj: 1
zone: 20 <-- shouldn't this be -20?

Yes---that is a bug in lib/proj/convert.c that wasn't there in 5.3---probably my fault. I have fixed it now so future imports should be OK. To get around the problem here edit the cellhd/markus.1 file so zone is -20.

Paul

Markus Neteler wrote:

Hi,

a colleague of mine from Argentina is facing problems
to import LANDSAT data in UTM.

Displaying a map leads to:

GRASS 5.7.cvs > d.rast markus.1
WARNING: [markus.1] in mapset [beinlich] - in different zone [20] than
         current region [-20]

Markus,

I don't know why the above occurs, but I did want to explain that the
following is indeed a proper southern hemisphere definition. The
southern hemisphere in WKT is noted by a false northing of 10000000.

GRASS 5.7.cvs > g.proj -w
PROJCS["UTM Zone 20, Southern Hemisphere",
    GEOGCS["wgs84",
        DATUM["WGS_1984",
            SPHEROID["wgs84",6378137,298.257223563],
            TOWGS84[0.000,0.000,0.000]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-63],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["meter",1]]

May it be possible that G_get_projinfo() doesn't understand
well that 'south' is defined?

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent

On Thu, Oct 14, 2004 at 03:45:11PM +0100, Paul Kelly wrote:

Hello Markus

On Thu, 14 Oct 2004, Markus Neteler wrote:

>Hi,
>
>a colleague of mine from Argentina is facing problems
>to import LANDSAT data in UTM.
>
>Displaying a map leads to:
>
>GRASS 5.7.cvs > d.rast markus.1
>WARNING: [markus.1] in mapset [beinlich] - in different zone [20] than
> current region [-20]
>WARNING: unable to open raster map [markus.1 in beinlich]
>ERROR: Not able to open cellfile for [markus.1]
>
>The location is defined as (UTM, southern hemisphere):
[...]
>
>Looking at the map header:
>
>GRASS 5.7.cvs > cd cellhd/
>GRASS 5.7.cvs > cat markus.1
>proj: 1
>zone: 20 <-- shouldn't this be -20?

Yes---that is a bug in lib/proj/convert.c that wasn't there in
5.3---probably my fault. I have fixed it now so future imports should be
OK.
To get around the problem here edit the cellhd/markus.1 file so zone
is -20.

Yes, we used this trick, but now we can try the bugfix as well.

Thanks

Markus