[GRASS-user] tiff imported to GRASS loses minus sign in west coordinate

A. Marcia BARBOSA anamarciabarbosa at gmail.com
Thu Oct 28 13:56:06 EDT 2010


Dear lists,

I need to import the map available here
(http://geodata.grid.unep.ch/mod_download/download_geospatial.php?selectedID=2150&newFile=download/Nightlights_2003_tif.zip)
to GRASS. The map is in Tiff format and appears fine in QGIS, but when
I import it to GRASS (with r.in.gdal) it becomes a very narrow N-S
stripe.

Here's the raster info that QGIS gives me on this map:

- - -
Driver: GTiff/GeoTIFF
Files: /media/disk/MARCIA/dadosExternos/variaveis/UNEP/nightLights/N_Light_2003.tif
       /media/disk/MARCIA/dadosExternos/variaveis/UNEP/nightLights/N_Light_2003.aux
       /media/disk/MARCIA/dadosExternos/variaveis/UNEP/nightLights/N_Light_2003.rrd
Size is 43201, 15601
Coordinate System is:
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"]]
Origin = (-180.004166669999989,65.004166670000004)
Pixel Size = (0.008333333300000,-0.008333333300000)
Metadata:
  TIFFTAG_SOFTWARE=IMAGINE TIFF Support
Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved
@(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date:
2004/09/15 18:42:01EDT $
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-180.0041667,  65.0041667) (180d 0'15.00"W, 65d 0'15.00"N)
Lower Left  (-180.0041667, -65.0041661) (180d 0'15.00"W, 65d 0'15.00"S)
Upper Right ( 180.0041652,  65.0041667) (180d 0'14.99"E, 65d 0'15.00"N)
Lower Right ( 180.0041652, -65.0041661) (180d 0'14.99"E, 65d 0'15.00"S)
Center      (  -0.0000007,   0.0000003) (  0d 0'0.00"W,  0d 0'0.00"N)
Band 1 Block=64x64 Type=Byte, ColorInterp=Gray
  Min=0.000 Max=63.000
  Minimum=0.000, Maximum=63.000, Mean=2.909, StdDev=3.132
  Overviews: 10801x3901, 5401x1951, 2701x976, 1351x488, 676x244, 338x122, 169x61
  Metadata:
    STATISTICS_MINIMUM=0
    STATISTICS_MAXIMUM=63
[...]
- - -

And here's what r.info says about the same map after importing it to GRASS:

- - -
Raster: NLight2003
Rows: 15601
Columns: 43201
N-S resolution: 0.00833333
E-W resolution: 1.92863e-07
North: 65.0042
South: -65.0042
East: 180.004
West: 179.996
Format: integer (0 byte)
Minimum value: 0
Maximum value: 63
Data description: generated by r.in.gdal
Comments: r.in.gdal -o
input="/media/disk/MARCIA/TdadosExternos/variaveis/UNEP/nightLights/N_Light_2003.tif"
output="NLight2003"

- - -

Most of this info looks fine, except the E-W resolution which should
be 0.008333 (like the N-S one), and the west coordinate which should
have a "minus" sign.

I'm using QGIS 1.5 with the GRASS plugin, and tried both under Ubuntu
and Windows. I tried also having someone save it as ASCII and
importing with r.in.arc, but the result was always the same. Any ideas
about what might be causing this? Anyone can manage to import this map
to GRASS correctly?

Thanks for any help,
Márcia


More information about the grass-user mailing list