Quantcast
Channel: Question and Answer » gdal
Viewing all articles
Browse latest Browse all 397

What is the correct syntax for using gdal_rasterize with a PostGIS datasource

$
0
0

I have a multipolygon layer in PostGIS and I would like to use gdal_rasterize to generate a raster. I cannot find the correct syntax to specify PostGIS as the data source.

$ gdal_rasterize -a labor_force_2013_12 -l unemployment_by_county PG:'host=localhost user=usernamehere' out.tif
ERROR 4: `out.tif' does not exist in the file system, and is not recognised as a supported dataset name.`

All the gdal_rasterize examples I can find online use a shapefile as the data source but the gdal_rasterize man page says that the src_datasource parameter can be “Any OGR supported readable datasource”


Viewing all articles
Browse latest Browse all 397

Trending Articles