[gdal-dev] gdal_rasterize with text attributes.

Mike Toews mwtoews at gmail.com
Sat Jun 27 00:54:38 PDT 2015


Rasters can only store numeric types, not strings. But you could
either rasterize the primary key, or reclassify the strings into a
so-called lookup table of ID and string (e.g. 1="green", 2="blue",
etc.). And then you could look-up the text from a raster using the
common integer ID.

-Mike

On 27 June 2015 at 11:06, Ricardo Oliveira <oliveira.ricardo at hotmail.com> wrote:
> Hello everyone,
>
> I'm trying to do a simple vector to raster conversion using an attribute
> field stored as string. Am I wrong or does gdal_rasterize does not accept
> text fields as attributes?
>
> Thanks for any insight.
>
> Ricardo O.


More information about the gdal-dev mailing list