[GRASS-user] Data ranges of geotiff not preserved after import to GRASS

Bill Hudspeth bhudspeth at edac.unm.edu
Wed Aug 10 13:29:29 PDT 2016


Hello

I am trying to import a multiband geotiff into GRASS 7.0.3 (running on Ubuntu 16.01). The gdalinfo output shows the 4 bands, and their data ranges. Both my geotiff and my GRASS location are in the projection UTM Zone 13N, WGS84 (epsg:32613). My GRASS region is 0.5 meters to import a panchromatic band, but the 4 bands in the multiband file are 2.0 m resolution. After I import, the data ranges of the 4 new grass rasters are very different from those listed in the gdalinfo output below.

gdalinfo o10APR11180709-M2AS-055552078010_01_P001.tif
Driver: GTiff/GeoTIFF
Files: o10APR11180709-M2AS-055552078010_01_P001.tif
       o10APR11180709-M2AS-055552078010_01_P001.tif.aux.xml
Size is 3534, 2684
Coordinate System is:
PROJCS["WGS 84 / UTM zone 13N",
    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",-105],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32613"]]
Origin = (318626.000000000000000,3848648.000000000000000)
Pixel Size = (2.000000000000000,-2.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_ARTIST=PCI
  TIFFTAG_DATETIME=2010:04:11 18:07:09
  TIFFTAG_SOFTWARE=PCI Geomatica
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  318626.000, 3848648.000) (106d58'54.51"W, 34d45'49.98"N)
Lower Left  (  318626.000, 3843280.000) (106d58'50.35"W, 34d42'55.81"N)
Upper Right (  325694.000, 3848648.000) (106d54'16.62"W, 34d45'54.41"N)
Lower Right (  325694.000, 3843280.000) (106d54'12.63"W, 34d43' 0.24"N)
Center      (  322160.000, 3845964.000) (106d56'33.53"W, 34d44'25.13"N)
Band 1 Block=3534x2 Type=UInt16, ColorInterp=Red
  Min=145.000 Max=473.000
  Minimum=145.000, Maximum=473.000, Mean=286.443, StdDev=29.355
  NoData Value=0
  Metadata:
    STATISTICS_MAXIMUM=473
    STATISTICS_MEAN=286.44285428343
    STATISTICS_MINIMUM=145
    STATISTICS_STDDEV=29.354503358529
Band 2 Block=3534x2 Type=UInt16, ColorInterp=Green
  Min=150.000 Max=771.000
  Minimum=150.000, Maximum=771.000, Mean=447.144, StdDev=61.481
  NoData Value=0
  Metadata:
    STATISTICS_MAXIMUM=771
    STATISTICS_MEAN=447.14438693812
    STATISTICS_MINIMUM=150
    STATISTICS_STDDEV=61.481469436348
Band 3 Block=3534x2 Type=UInt16, ColorInterp=Blue
  Min=116.000 Max=940.000
  Minimum=116.000, Maximum=940.000, Mean=566.192, StdDev=92.234
  NoData Value=0
  Metadata:
    STATISTICS_MAXIMUM=940
    STATISTICS_MEAN=566.19172957414
    STATISTICS_MINIMUM=116
    STATISTICS_STDDEV=92.234459276031
Band 4 Block=3534x2 Type=UInt16, ColorInterp=Undefined
  NoData Value=0


My outputs from r.info for the 4 imported bands are below...Why are the data ranges not correct??

+----------------------------------------------------------------------------+
 | Map:      o10APR11180709_M2AS_055552078  Date: Wed Aug 10 14:21:20 2016    |
 | Mapset:   worldview2                     Login of Creator: wilbur          |
 | Location: PotteryMound                                                     |
 | DataBase: /home/wilbur/grass_data                                          |
 | Title:     ( o10APR11180709_M2AS_055552078010_01_P001.1 )                  |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    CELL                                                       |
 |   Rows:         2684                                                       |
 |   Columns:      3534                                                       |
 |   Total Cells:  9485256                                                    |
 |        Projection: UTM (zone 13)                                           |
 |            N:    3848648    S:    3843280   Res:     2                     |
 |            E:     325694    W:     318626   Res:     2                     |
 |   Range of data:    min = 133  max = 780                                   |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    r.in.gdal -k input="/home/wilbur/Rio_Abajo_Active/isleta_pottery_mou\   |
 |    nd/WorldView/WorldView-2_Image_Data/GeoTIFF_16-Bit/o10APR11180709-M2\   |
 |    AS-055552078010_01_P001.tif" output="o10APR11180709_M2AS_05555207801\   |
 |    0_01_P001" memory=300 offset=0                                          |
 |                                                                            |





+----------------------------------------------------------------------------+
 | Map:      o10APR11180709_M2AS_055552078  Date: Wed Aug 10 14:21:20 2016    |
 | Mapset:   worldview2                     Login of Creator: wilbur          |
 | Location: PotteryMound                                                     |
 | DataBase: /home/wilbur/grass_data                                          |
 | Title:     ( o10APR11180709_M2AS_055552078010_01_P001.2 )                  |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    CELL                                                       |
 |   Rows:         2684                                                       |
 |   Columns:      3534                                                       |
 |   Total Cells:  9485256                                                    |
 |        Projection: UTM (zone 13)                                           |
 |            N:    3848648    S:    3843280   Res:     2                     |
 |            E:     325694    W:     318626   Res:     2                     |
 |   Range of data:    min = 119  max = 1193                                  |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    r.in.gdal -k input="/home/wilbur/Rio_Abajo_Active/isleta_pottery_mou\   |
 |    nd/WorldView/WorldView-2_Image_Data/GeoTIFF_16-Bit/o10APR11180709-M2\   |
 |    AS-055552078010_01_P001.tif" output="o10APR11180709_M2AS_05555207801\   |
 |    0_01_P001" memory=300 offset=0                                          |
 |                                                                            |

 +----------------------------------------------------------------------------+
 | Map:      o10APR11180709_M2AS_055552078  Date: Wed Aug 10 14:21:20 2016    |
 | Mapset:   worldview2                     Login of Creator: wilbur          |
 | Location: PotteryMound                                                     |
 | DataBase: /home/wilbur/grass_data                                          |
 | Title:     ( o10APR11180709_M2AS_055552078010_01_P001.3 )                  |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    CELL                                                       |
 |   Rows:         2684                                                       |
 |   Columns:      3534                                                       |
 |   Total Cells:  9485256                                                    |
 |        Projection: UTM (zone 13)                                           |
 |            N:    3848648    S:    3843280   Res:     2                     |
 |            E:     325694    W:     318626   Res:     2                     |
 |   Range of data:    min = 59  max = 1176                                   |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    r.in.gdal -k input="/home/wilbur/Rio_Abajo_Active/isleta_pottery_mou\   |
 |    nd/WorldView/WorldView-2_Image_Data/GeoTIFF_16-Bit/o10APR11180709-M2\   |
 |    AS-055552078010_01_P001.tif" output="o10APR11180709_M2AS_05555207801\   |
 |    0_01_P001" memory=300 offset=0                                          |
 |                                                                            |
 +----------------------------------------------------------------------------+


 +----------------------------------------------------------------------------+
 | Map:      o10APR11180709_M2AS_055552078  Date: Wed Aug 10 14:21:20 2016    |
 | Mapset:   worldview2                     Login of Creator: wilbur          |
 | Location: PotteryMound                                                     |
 | DataBase: /home/wilbur/grass_data                                          |
 | Title:     ( o10APR11180709_M2AS_055552078010_01_P001.4 )                  |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    CELL                                                       |
 |   Rows:         2684                                                       |
 |   Columns:      3534                                                       |
 |   Total Cells:  9485256                                                    |
 |        Projection: UTM (zone 13)                                           |
 |            N:    3848648    S:    3843280   Res:     2                     |
 |            E:     325694    W:     318626   Res:     2                     |
 |   Range of data:    min = 50  max = 1341                                   |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    r.in.gdal -k input="/home/wilbur/Rio_Abajo_Active/isleta_pottery_mou\   |
 |    nd/WorldView/WorldView-2_Image_Data/GeoTIFF_16-Bit/o10APR11180709-M2\   |
 |    AS-055552078010_01_P001.tif" output="o10APR11180709_M2AS_05555207801\   |
 |    0_01_P001" memory=300 offset=0                                          |
 |                                                                            |


Thanks!!


More information about the grass-user mailing list