平铺浮点栅格,与leaflet.tilelayer.glcolorscale一起使用

时间:2019-02-21 19:18:11

标签: leaflet gdal

我想使用leaflet.tilelayer.glcolorscale插件。我有一个float32 geotiff栅格,值的范围是0到〜66。阅读github上的文档,似乎它们正在使用非标准方法进行切片。我熟悉拍摄RGBA栅格并使用gdal2tile.py创建png tileset。

如何平铺此float32 Geotiff以便与此插件一起使用?

我在下面的源地理位置上提供了gdalinfo。我尝试使用gdal2tile.py进行平铺,但效果不佳。谢谢。

>gdalinfo spat_model.tif
Driver: GTiff/GeoTIFF
Files: spat_model.tif
Size is 8618, 6783
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
    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["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["X",EAST],
    AXIS["Y",NORTH],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],
    AUTHORITY["EPSG","3857"]]
Origin = (-12148437.776279186829925,6306111.101677093654871)
Pixel Size = (44.801481702694637,-44.801481702694637)
Metadata:
  AREA_OR_POINT=Area
  DataType=Generic
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-12148437.776, 6306111.102) (109d 7'52.58"W, 49d11' 1.78"N)
Lower Left  (-12148437.776, 6002222.651) (109d 7'52.58"W, 47d22' 2.03"N)
Upper Right (-11762338.607, 6306111.102) (105d39'46.39"W, 49d11' 1.78"N)
Lower Right (-11762338.607, 6002222.651) (105d39'46.39"W, 47d22' 2.03"N)
Center      (-11955388.192, 6154166.876) (107d23'49.49"W, 48d17' 0.98"N)
Band 1 Block=8618x1 Type=Float32, ColorInterp=Gray
  NoData Value=-1
  Metadata:
    RepresentationType=ATHEMATIC

0 个答案:

没有答案