[gdal-dev] Problems with large ASTER GeoTIFF

Nicole Stoffels stoffels at f2e.de
Tue Apr 15 04:09:16 PDT 2014


Thank you both for your answers. I have applied your suggestions.

Making a single command works but does not change the result.

Concerning the compression, I used LZW instead of NONE. However, it also 
does not make any difference.

I also changed the srcwin parameters. I do not get any errors and the 
gdalinfo says that the subarea is within the original area.

I skipped the png part to make it easier first. And after trying to open 
the new tif with gimp and getting an error message that the float32 data 
cannot be displayed I added the ot-flag. Here is my new command line:

$ gdal_translate -ot Byte -srcwin 0 0 4000 4000 -co COMPRESS=LZW 
EUD_CP-DEMS_6500035000-AA.tif test.tif

What I get is a completely black tif. Here are the two gdalinfo-outputs, 
that I get:

$ gdalinfo -mm EUD_CP-DEMS_6500035000-AA.tif
Driver: GTiff/GeoTIFF
Files: EUD_CP-DEMS_6500035000-AA.tif
Size is 40000, 40000
Coordinate System is:
PROJCS["ETRS89 / ETRS-LAEA",
     GEOGCS["ETRS89",
         DATUM["European_Terrestrial_Reference_System_1989",
             SPHEROID["GRS 1980",6378137,298.2572221000027,
                 AUTHORITY["EPSG","7019"]],
             AUTHORITY["EPSG","6258"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4258"]],
     PROJECTION["Lambert_Azimuthal_Equal_Area"],
     PARAMETER["latitude_of_center",52],
     PARAMETER["longitude_of_center",10],
     PARAMETER["false_easting",4321000],
     PARAMETER["false_northing",3210000],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","3035"]]
Origin = (6000000.000000000000000,4000000.000000000000000)
Pixel Size = (25.000000000000000,-25.000000000000000)
Metadata:
   TIFFTAG_DOCUMENTNAME=EUD_CP-DEMS_6500035000-AA.tif
   TIFFTAG_IMAGEDESCRIPTION=File written by egcs_wrgtif 2.1
   TIFFTAG_SOFTWARE=IDL 8.2, Exelis Visual Information Solutions, Inc.
   TIFFTAG_DATETIME=2013:09:17 21:00:27
   TIFFTAG_XRESOLUTION=100
   TIFFTAG_YRESOLUTION=100
   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
   AREA_OR_POINT=Area
Image Structure Metadata:
   COMPRESSION=LZW
   INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( 6000000.000, 4000000.000) ( 37d47'0.49"E, 56d 7'28.33"N)
Lower Left  ( 6000000.000, 3000000.000) ( 32d47'35.21"E, 47d45'16.08"N)
Upper Right ( 7000000.000, 4000000.000) ( 51d32'27.75"E, 51d55'27.24"N)
Lower Right ( 7000000.000, 3000000.000) ( 44d57'3.39"E, 44d18'11.63"N)
Center      ( 6500000.000, 3500000.000) ( 41d41'39.51"E, 50d15'46.40"N)
Band 1 Block=40000x1 Type=Float32, ColorInterp=Gray
ERROR 1: Failed to compute min/max, no valid pixels found in sampling.

$ gdalinfo -mm test.tif
Driver: GTiff/GeoTIFF
Files: test.tif
Size is 4000, 4000
Coordinate System is:
PROJCS["ETRS89 / ETRS-LAEA",
     GEOGCS["ETRS89",
         DATUM["European_Terrestrial_Reference_System_1989",
             SPHEROID["GRS 1980",6378137,298.2572221010002,
                 AUTHORITY["EPSG","7019"]],
             AUTHORITY["EPSG","6258"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4258"]],
     PROJECTION["Lambert_Azimuthal_Equal_Area"],
     PARAMETER["latitude_of_center",52],
     PARAMETER["longitude_of_center",10],
     PARAMETER["false_easting",4321000],
     PARAMETER["false_northing",3210000],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","3035"]]
Origin = (6000000.000000000000000,4000000.000000000000000)
Pixel Size = (25.000000000000000,-25.000000000000000)
Metadata:
   TIFFTAG_DOCUMENTNAME=EUD_CP-DEMS_6500035000-AA.tif
   TIFFTAG_IMAGEDESCRIPTION=File written by egcs_wrgtif 2.1
   TIFFTAG_SOFTWARE=IDL 8.2, Exelis Visual Information Solutions, Inc.
   TIFFTAG_DATETIME=2013:09:17 21:00:27
   TIFFTAG_XRESOLUTION=100
   TIFFTAG_YRESOLUTION=100
   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
   AREA_OR_POINT=Area
Image Structure Metadata:
   COMPRESSION=LZW
   INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( 6000000.000, 4000000.000) ( 37d47'0.49"E, 56d 7'28.33"N)
Lower Left  ( 6000000.000, 3900000.000) ( 37d10'18.23"E, 55d18'7.26"N)
Upper Right ( 6100000.000, 4000000.000) ( 39d16'14.71"E, 55d46'30.54"N)
Lower Right ( 6100000.000, 3900000.000) ( 38d38'6.52"E, 54d57'38.92"N)
Center      ( 6050000.000, 3950000.000) ( 38d12'51.64"E, 55d32'35.70"N)
Band 1 Block=4000x2 Type=Byte, ColorInterp=Gray
     Computed Min/Max=0.000,0.000

Am 14.04.2014 19:51, schrieb Etienne Tourigny:>
>
>
> On Mon, Apr 14, 2014 at 11:16 AM, Nicole Stoffels <stoffels at f2e.de
> <mailto:stoffels at f2e.de>> wrote:
>
>     Dear Gdal-List,
>
>     I have a large ASTER file (downloaded from
>     http://www.eea.europa.eu/data-__and-maps/data/eu-dem#tab-__european-data
>     <http://www.eea.europa.eu/data-and-maps/data/eu-dem#tab-european-data>)
>     in the GeoTIFF-format. It is compressed with LZW. What I want to do is:
>
>     1. unpack it
>     2. seperate a smaller region from it
>     3. convert this regional GeoTIFF to a PNG
>
>     What I am doing:
>
>     $ gdal_translate -co COMPRESS=NONE EUD_CP-DEMS_6500035000-AA.tif
>     tmp1.tif
>
>     $ gdal_translate -srcwin 6500 3300 1000 1000 tmp1.tif tmp2.tif
>
>     $ gdal_translate -of PNG tmp2.tif tmp2.png
>
>     When I display the info with gdalinfo the first step seems to
>     produce a decompressed file. The line COMPRESSION=LZW is not there
>     anymore.
>
>
> You need to set the compression options on any gdal command, it does not
> use the compression of the input file. Also, you specifically asked for
> no compression, so it's doing what you told it to.
> use "-co COMPRESS=LZW"


>
>     However, if I want to display the min and max with gdalinfo, I get
>     the following error.
>
>     ERROR 1: Failed to compute min/max, no valid pixels found in sampling.
>
>
> try without changing the extents and see if a single command (as
> suggested by Jean-Luc) works
>
>
>     I thought that the file might be too large, but if I change the
>     data_type from float 32 to e.g. Int16 I get 0 as min and max value.
>     That's why I assume that already the first gdal_translate does not
>     work as I actually want it to work.
>
>
> your input values are probably between 0 and 1 in this case
>
>
>     The other two transformations work without error messages. However,
>     in the end I get a black png.
>
>     I have tried all types of transformation with various options. But
>     as I am new in the subject and do not know much about gdal, I have
>     no further ideas how to generate a file from my large GeoTIFF to
>     continue working with.
>
>     I hope someone has an idea, what's going wrong with my
>     gdal_translations. Thanks very much in advance.
>
>     Best regards
>     Nicole
>     _________________________________________________
>     gdal-dev mailing list
>     gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>     http://lists.osgeo.org/__mailman/listinfo/gdal-dev
>     <http://lists.osgeo.org/mailman/listinfo/gdal-dev>
>
>





More information about the gdal-dev mailing list