[GIS] Rasterize a vector layer in PostGIS

postgisraster

Related to this question asked here on gis.se and this thread on postgis-user, has anyone worked out a good solution for in-database rasterization of a vector layer using PostGIS? It sounds like the necessary functions are available and it is possible to get a valid output, but not one that is readable by GDAL et al. because it has irregular tiles.

To be more specific, I would like to rasterize two distinct vector maps of the US, counties and NBCD mapping zones, to a particular resolution and both aligned with an existing raster. It is possible to do this with gdal_rasterize, but with some trial and error as I recall — mainly because the extents of the three inputs do not match, I expect.

Any thoughts?

Best Answer

Here is a guide on how to rasterize a vector table in PostGIS...