1

I have geotiff file, please see gdalinfo

Size is 28249, 24333
Coordinate System is:
PROJCS["WGS 84 / UTM zone 38N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",45],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","32638"]]
Origin = (353455.689043999998830,4691159.864544000476599)
Pixel Size = (0.600000000000001,-0.599999999999992)
Metadata:
  AREA_OR_POINT=Area
  DataType=Generic
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  353455.689, 4691159.865) ( 43d13'13.84"E, 42d21'32.06"N)
Lower Left  (  353455.689, 4676560.065) ( 43d13'27.15"E, 42d13'38.93"N)
Upper Right (  370405.089, 4691159.865) ( 43d25'34.49"E, 42d21'42.89"N)
Lower Right (  370405.089, 4676560.065) ( 43d25'46.26"E, 42d13'49.71"N)
Center      (  361930.389, 4683859.965) ( 43d19'30.43"E, 42d17'41.06"N)
Band 1 Block=28249x1 Type=Float32, ColorInterp=Gray
  NoData Value=256
  Metadata:
    RepresentationType=ATHEMATIC
Band 2 Block=28249x1 Type=Float32, ColorInterp=Undefined
  NoData Value=256
  Metadata:
    RepresentationType=ATHEMATIC
Band 3 Block=28249x1 Type=Float32, ColorInterp=Undefined
  NoData Value=256
  Metadata:
    RepresentationType=ATHEMATIC

My two step to create tiles
1. gdal_translate -ot byte -of vrt source.tiff destination.vrt
2. gdal2tiles -p raster -w leaflet destination.vrt outfupfolder

image in tiff image in tiff

sdsddsdsds image after gdal2tiles

How to avoid losing color? please help my

UPDATE_1 So, pct2rgb write error

ct_size = ct.GetCount() AttributeError: 'NoneType' object has no attribute 'GetCount'

I did not find an explanation for this error I'm stumped, who can help me

4
  • Maybe related: gis.stackexchange.com/questions/48034/…. ColorInterp is expected to be rgb, not gray-undefinded-undefined as in your file. If your image has a colour table, you have to expand that to rgb before tiling.
    – AndreJ
    May 1 '18 at 17:18
  • What software were used for image "image in tiff"? What method does it use for showing the 32 bit data on screen? Does it apply min-max stretch or something like that?
    – user30184
    May 1 '18 at 20:06
  • "image in tiff" from qgis
    – ambako
    May 2 '18 at 6:11
  • AndreJ I reads this thread, I will report the result. thanks
    – ambako
    May 2 '18 at 6:15

Your Answer

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

Browse other questions tagged or ask your own question.