Questions tagged [gdal-rasterize]
Burns vector geometries (points, lines, and polygons) into the raster band(s) of a raster image. Vectors are read from OGR supported vector formats.
107 questions
3 votes
1 answer
148 views
Fixing GDAL Rasterize missing geometries that don't intersect pixel centers
I need a polygon dataset (buildings) rasterized in 10 x 10 m resolution. Since the raster data needs to be aligned with other rasters, I'm using Rasterize (Overwrite with a fixed value) on a prepared ...
2 votes
2 answers
170 views
Adding one missing contour line with GDAL/OGR
Due to tetraphobia in Taiwan we are not allowed to have streets whose names end in "4". My mission is to reconstruct where 14th Street would have gone. I shall use GDAL/OGR, pretending the ...
0 votes
0 answers
268 views
gdal_rasterize a large geopackage
Trying to run this command with gdal_rasterize: gdal_rasterize --config CHECK_DISK_FREE_SPACE NO -co "PREDICTOR=2" -co "COMPRESS=LZW" -of GTiff -co BIGTIFF=YES -co TILED=YES -co ...
0 votes
0 answers
137 views
GDAL Rasterize over attribute (rewriting raster issue) in QGIS
I'm trying to process gdal:rasterize_over in QGIS Python console. The same problem persists - this function is rewriting the input sample raster instead of making a new one as output. I've tried (look ...
0 votes
1 answer
2k views
Create binary mask (0, 1) from shapefile using QGIS
I have a TIFF file and a shapefile with polygons. What i would like to achieve is a binary TIFF file with the mask of the polygons indicated as 1's and the surrounding extend of the TIFF file as 0's. ...
1 vote
2 answers
203 views
Keep a factor field (or a RAT in general) when buffering a raster in R
I am trying to select pixels from a MODIS raster (with a 250 meters resolution and covering all Europe) based on their location. For that I am using a shapefile that contains ca. 200 points (also ...
2 votes
1 answer
617 views
Saving gdal_rasterize output to memory in Python script
I have the following Python line to execute GDAL's rasterize function on a shapefile subprocess.call("gdal_rasterize -te {txextent} {tyextent} -tr {resolution} -burn 1 {shapefile} {output_file}....
0 votes
1 answer
206 views
How can I use the <src_datasource> parameter from gdal_rasterize?
I'm using the following command to generate a TIFF file from a shapefile: gdal_rasterize -burn 255 -burn 0 -burn 0 -ot Byte -tr 0.0000169959 0.0000169959 -l layer_name input.shp output.tif It works ...