I was trying to overlay a shapefile to some raster images from a directory using
gdal_rasterize. But then encountered this error:
ERROR 6: The PNG driver does not support update access to existing datasets.
input_path has the raster images and the
shp_path has the shapefile. Any ideas?
@echo off set "inpath=C:\path\to\input\" set "shppath=C:\path\to\shape\file\" cd /d "%inpath%" for %%a in (*.png) do ( set "fileName=%%a" echo Overlaying the shape file . . . FORFILES /m %%a /C "cmd /c gdal_rasterize -b 1 -b 2 -b 3 -burn 0 -burn 0 -burn 0 %shppath%\shpfile.shp %in_path%\@fname.png" )