在sentinel 2数据上gdal2tiles.py之后的模糊输出

时间:2017-10-16 20:01:54

标签: gdal

我正在尝试为Sentinal2图像设置图块服务。

为了测试我使用S2A_MSIL2A_20171007T103021_N0205_R108_T32UMC_20171007T103241.SAFE

我参加了GRANULE / L2A_T32UMC_A011974_20171007T103241 / IMG_DATA / R10m / L2A_T32UMC_20171007T103021_B03_10m.jp2

original Copernicus Sentinel数据[2017]'用于Sentinel数据

gdalinfo L2A_T32UMC_20171007T103021_B03_10m.jp2

Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library
Files: L2A_T32UMC_20171007T103021_B03_10m.jp2
       L2A_T32UMC_20171007T103021_B03_10m.jp2.aux.xml
Size is 10980, 10980
Coordinate System is:
PROJCS["WGS 84 / UTM zone 32N",
    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"]],
        AXIS["Latitude",NORTH],
        AXIS["Longitude",EAST],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9],
    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","32632"]]
Origin = (399960.000000000000000,5800020.000000000000000)
Pixel Size = (10.000000000000000,-10.000000000000000)
Corner Coordinates:
Upper Left  (  399960.000, 5800020.000) (  7d31'53.50"E, 52d20'28.85"N)
Lower Left  (  399960.000, 5690220.000) (  7d33'47.90"E, 51d21'15.96"N)
Upper Right (  509760.000, 5800020.000) (  9d 8'35.85"E, 52d21' 1.39"N)
Lower Right (  509760.000, 5690220.000) (  9d 8'24.68"E, 51d21'47.37"N)
Center      (  454860.000, 5745120.000) (  8d20'40.48"E, 51d51'18.19"N)
Band 1 Block=1024x1024 Type=UInt16, ColorInterp=Undefined
  Min=1978.000 Max=13691.000 
  Minimum=1978.000, Maximum=13691.000, Mean=7548.914, StdDev=1541.257
  Overviews: 5490x5490, 2745x2745, 1372x1372, 686x686, 343x343
  Overviews: arbitrary
  Metadata:
    STATISTICS_MAXIMUM=13691
    STATISTICS_MEAN=7548,914
    STATISTICS_MINIMUM=1978
    STATISTICS_STDDEV=1541,2571173571

我的想法是使用gdal2tiles.py生成切片。但我认为我的结果不可用。

运行gdal2tiles.py -p raster L2A_T32UMC_20171007T103021_B03_10m.jp2 ./tiles

文件夹中生成的图像对我来说很奇怪:

a tile after gdal

我已经查看了文档并尝试使用这些选项 并通读gis.stackexchange。 (https://gis.stackexchange.com/questions/200251/how-to-use-gdal2tiles-on-a-custom-tiff-image-recieved-from-providers-to-generate

但我无法接近解决方案。 有人发现我的错误并可以帮助我吗?

非常感谢,每个人都抽出时间!

亲切的问候 尼古拉斯

1 个答案:

答案 0 :(得分:3)

我能够向专家询问他的建议。

这是解决方案,适用于我的数据:

似乎是,gdal2tiles需要显式的unit8(字节)

  

gdal_translate -ot Byte -scale xxx.jp2 out.tif

     

gdal2tiles.py out.tif tms

亲切的问候 尼古拉斯