[GRASS-user] Error while using r.in.gdal for USGS landsat7 images

Hi there,

I'm using r.in.gdal to import Landsat7 images downloaded from USGS website. These landsat images are distributed in UTM-WGS84 for the specific zone. in this case I'm working with images from Brazil (WGS84 UTM ZONE 24S). So first I created an Location based on EPSG:32724.
Here goes the gdalinfo command for the image:
/Driver: GTiff/GeoTIFF
Files: L5216065_06520070405_B10.TIF
Size is 8171, 6991
Coordinate System is:
PROJCS["WGS 84 / UTM zone 24N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                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",-39],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32624"]]
Origin = (443999.999999999941792,-694500.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)/

As can be seen it's North instead of South. Nevertheless, r.in.gdal imports it and it even says: Projection of input dataset and current location appear to match
But when I try to display I get an error window stating:
Execution failed: 'd.rast -o map=import@PERMANENT --q'
Details:
Error: Unable to open raster map <import@PERMANENT>
And nothing else is stated

Shall I add this issue to the Error/debug trac list? Or how can I fix this?

Thanks
Antonio

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5258 (20100707) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

António wrote:

I'm using r.in.gdal to import Landsat7 images downloaded
from USGS website. These landsat images are distributed in
UTM-WGS84 for the specific zone. in this case I'm working
with images from Brazil (WGS84 UTM ZONE 24S). So first I
created an Location based on EPSG:32724.
Here goes the gdalinfo command for the image:
/Driver: GTiff/GeoTIFF
Files: L5216065_06520070405_B10.TIF
Size is 8171, 6991
Coordinate System is:
PROJCS["WGS 84 / UTM zone 24N",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS
84",6378137,298.257223563,

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",-39],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","32624"]]
Origin = (443999.999999999941792,-694500.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)/

As can be seen it's North instead of South. Nevertheless,
r.in.gdal imports it and it even says: Projection of input
dataset and current location appear to match
But when I try to display I get an error window stating:
Execution failed: 'd.rast -o map=import@PERMANENT --q'
Details:
Error: Unable to open raster map <import@PERMANENT>
And nothing else is stated

what does "g.list rast" say? how about r.info?

Hamish

r.info displays normal information such as Extent, resolution etc... So it seems all ok

Hamish wrote:

António wrote:
  

I'm using r.in.gdal to import Landsat7 images downloaded
from USGS website. These landsat images are distributed in
UTM-WGS84 for the specific zone. in this case I'm working
with images from Brazil (WGS84 UTM ZONE 24S). So first I
created an Location based on EPSG:32724.
Here goes the gdalinfo command for the image:
/Driver: GTiff/GeoTIFF
Files: L5216065_06520070405_B10.TIF
Size is 8171, 6991
Coordinate System is:
PROJCS["WGS 84 / UTM zone 24N",
   GEOGCS["WGS 84",
       DATUM["WGS_1984",
           SPHEROID["WGS
84",6378137,298.257223563,
              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",-39],
   PARAMETER["scale_factor",0.9996],
   PARAMETER["false_easting",500000],
   PARAMETER["false_northing",0],
   UNIT["metre",1,
       AUTHORITY["EPSG","9001"]],
   AUTHORITY["EPSG","32624"]]
Origin = (443999.999999999941792,-694500.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)/

As can be seen it's North instead of South. Nevertheless,
r.in.gdal imports it and it even says: Projection of input
dataset and current location appear to match
But when I try to display I get an error window stating:
Execution failed: 'd.rast -o map=import@PERMANENT --q'
Details:
Error: Unable to open raster map <import@PERMANENT>
And nothing else is stated
    
what does "g.list rast" say? how about r.info?

Hamish

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5261 (20100708) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5261 (20100708) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

2010/7/7 António Rocha <antonio.rocha@deimos.com.pt>:

Hi there,

I'm using r.in.gdal to import Landsat7 images downloaded from USGS website.
These landsat images are distributed in UTM-WGS84 for the specific zone. in
this case I'm working with images from Brazil (WGS84 UTM ZONE 24S). So first
I created an Location based on EPSG:32724.
Here goes the gdalinfo command for the image:
/Driver: GTiff/GeoTIFF
Files: L5216065_06520070405_B10.TIF
Size is 8171, 6991
Coordinate System is:
PROJCS["WGS 84 / UTM zone 24N",

...

As can be seen it's North instead of South. Nevertheless, r.in.gdal imports
it and it even says: Projection of input dataset and current location appear
to match

but only appear I think - it is a garbage in/garbage out problem.
I would assign the correct EPSG code with

gdal_translate -a_srs ... badfile.tif goodfile.tif

then reimport. To catch all possible (rare) nonsense case in r.in.gdal I
consider to be overkill.

Markus

Hello Markus

I have just tested that and it seems to be the best solution. But in this case I didn't know that it was all set to north.

Markus Neteler wrote:

2010/7/7 António Rocha <antonio.rocha@deimos.com.pt>:
  

Hi there,

I'm using r.in.gdal to import Landsat7 images downloaded from USGS website.
These landsat images are distributed in UTM-WGS84 for the specific zone. in
this case I'm working with images from Brazil (WGS84 UTM ZONE 24S). So first
I created an Location based on EPSG:32724.
Here goes the gdalinfo command for the image:
/Driver: GTiff/GeoTIFF
Files: L5216065_06520070405_B10.TIF
Size is 8171, 6991
Coordinate System is:
PROJCS["WGS 84 / UTM zone 24N",
    

...
  

As can be seen it's North instead of South. Nevertheless, r.in.gdal imports
it and it even says: Projection of input dataset and current location appear
to match
    
but only appear I think - it is a garbage in/garbage out problem.
I would assign the correct EPSG code with

gdal_translate -a_srs ... badfile.tif goodfile.tif

then reimport. To catch all possible (rare) nonsense case in r.in.gdal I
consider to be overkill.

Markus

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5261 (20100708) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5261 (20100708) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com