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.

Filter by
Sorted by
Tagged with
5
votes
1answer
7k views

Rasterizing shapefiles with GDAL and Python?

I am trying to rasterize a shapefile, and write values from a specific column of the shapefile into the resulting GTiff. Here is what I've done so far, but that only creates a GTiff of zeros. from ...
5
votes
5answers
4k views

How do I create blank geotiff with same spatial properties as existing geotiff?

How do I use gdal to create a blank geotiff with the same spatial properties (size, resolution, extent, projection) as an existing geotiff? (The reason that I want to do this is that I'm using ...
4
votes
1answer
859 views

How to set opacity with gdal_rasterize

I am using gdal_rasterize to create a raster of a huge file containing polygons. I managed to generate the raster file with the right color and with the minimum size to tile it after with the ...
3
votes
3answers
6k views

How to convert file .shp to .tif using ogr or python or gdal

I need to convert files. I'm trying to use gdal_rasterize gdal_rasterize -b 1 -burn 0 -l file file.shp work.tif and the output is the following: ERROR 10: Pointer 'hDS' is NULL in '...
5
votes
2answers
957 views

Create MBTiles from geojson in raster format

I am trying to create raster file in the Mbtiles format. I tried , $ gdal_rasterize -ot Byte -burn 255 -burn 0 -burn 0 -ts 4950 4090 -of MBTiles station.geojson station.mbtiles I'm using, $...
4
votes
2answers
750 views

Get minimum, maximum, average, mean with gdal_rasterize?

I am not 100% sure but it seems like gdal_rasterize takes value of first found feature by default. Is there a way to tell I would like to get minimum / maximum / average / mean (/ count / sum just to ...
4
votes
1answer
420 views

extent parameter pyqgis gdal processing rasterize

I am having trouble with using gdal rasterize under windows in a pyqgis script. The command runs fine under linux without specifying any RAST_EXT parameter. On a windows platform, however, the ...
3
votes
1answer
372 views

Reversing the order of features in a layer using OGR

I'm working on rasterizing some polygons using gdal_rasterize. This works great, but I want the rasterize command to place features with lower FIDs on top of those with higher FIDs. (Gdal_rasterize ...
2
votes
1answer
868 views

Python and GDAL: NoneType error while reading shapefile

I am a newbie to GDAL. I have a shapefile of Britain which I want to rasterize. This file can be obtained from here selecting United Kingdom as Country and Administrative areas as Subject. Following ...
2
votes
1answer
935 views

error “pointer hDs is NULL in GDAL GetProjectionRef” when using gdal_rasterize [duplicate]

I want to convert a .shp to .tif. So I find the tool gdal_rasterize may help. But when I input the file it always meet this error: pointer hDs is NULL in GDAL GetProjectionRef I have tried different ...
1
vote
1answer
1k views

How to use gdal_rasterize with postgis vector?

I'm trying to convert a multipolygon vector layer to a raster using the GDAL tool gdal_rasterize. The command I am using is: gdal_rasterize -b 1 -burn -9999 PG:"dbname=db password=password" \ ...