Python GIS - Raster No Data Values (GDAL)

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 4

  • @saranazari3836
    @saranazari3836 3 года назад

    Why do we need to write
    'band1 [band1==ndv] = newndv' When we can just use 'ds.GetRasterBand(1).SetNoDataValue(newndv)' and it changes the no data value as well?

    • @geospatialschool
      @geospatialschool  3 года назад +1

      There are multiple ways to do things. Give it a try and see what happens

  • @lisalootte
    @lisalootte 4 года назад +1

    Is there a way to set a keyboard shortcut for running the script? Less clicking

    • @markbrown6623
      @markbrown6623 4 года назад

      Not sure if it helps you now but I've been running through these tutorials using Jupyter Notebooks. You can simply run the code using ctrl and enter.
      The iface.addRasterLayer(fn) won't work though unless you're in the QGIS console.