2

I have a Tiff:

D:\10000>gdalinfo 10000_EPSG2536_2.tif
Driver: GTiff/GeoTIFF
Files: 10000_EPSG2536_2.tif
Size is 58954, 54068
Coordinate System is:
PROJCS["unnamed",..]
Origin = (1450324.596294234700000,438752.955720250490000)
Pixel Size = (1.037488337128723,-1.037488337128723)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=DEFLATE
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( 1450324.596,  438752.956) 
Lower Left  ( 1450324.596,  382658.036) 
Upper Right ( 1511488.684,  438752.956)
Lower Right ( 1511488.684,  382658.036)
Center      ( 1480906.640,  410705.496) 
Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
  NoData Value=255
  Color Table (RGB with 256 entries)
    0: 0,0,0,255
    1: 255,255,255,255
    2: 0,0,0,255
    ...
    254: 0,0,0,255
   255: 0,0,0,0

And in QGIS it's looks like:

enter image description here

Here is OMS and my rastr above. So white is transparent. How can i remove NoData Value and Metadata tags from TIFF?

2

Use gdal_edit http://www.gdal.org/gdal_edit.html

-unsetnodata:

(GDAL >= 2.1) Remove existing nodata values.

Usage:

gdal_edit 10000_EPSG2536_2.tif -unsetnodata

gdal_edit.py is a Python script and depending on your environment you may need to start if as python gdal_edit.py.

  • It's works, NoData had removed. But image fully black now. It's possible to return white color on image? – Kliver Max Jun 6 '18 at 8:39
  • Oh, you have a paletted image, it can make some difference. Do you have a test image to share? But actually color #255 is black in the palette 255: 0,0,0,0. You should edit the palette to have 255: 255,255,255. – user30184 Jun 6 '18 at 8:59
  • I used solution from your another answer gis.stackexchange.com/questions/272847/… and it's works now my image looks nicely. Thanks man. – Kliver Max Jun 6 '18 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.