[postgis-devel] [WKTRaster] Setting properties on a raster

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Sun Feb 21 11:26:10 PST 2010


>I'm looking at setting the properties of a raster.  I managed to
>figure out how to set the SRID pretty easily:
>http://trac.osgeo.org/postgis/ticket/423

This is very great Zwarg!

>I'm thinking about ST_SetPixelType now, and I'm wondering how you want
>to handle the data conversions.  It seems like when the pixel type is
>changed, the raster data will need to be processed and either
>truncated or re-allocated, as the pixel type is changed.  Is that
>correct?

>A also noticed that ST_SetWidth and ST_SetHeight are not in the spec,
>is that intentional?  Would it ever make sense to set the height and
>the width?  In one sense, ST_SetPixelType is performing the same kind
>of truncation/expansion on the bit depth as ST_SetWidth/ST_SetHeight
>would perform the truncation/expansion in the spatial dimension.
>Should ST_SetPixelType be dropped if ST_SetWidth and ST_SetHeight are
>not implemented?  Or should ST_SetHeight and ST_SetWidth be
>implemented as well?

I agree that ST_SetPixelType does not really make sence... If I want to change the pixel type I would probably instead want to do something like:

ST_MapAlgebra(raster, 'int(A)') on a float raster or ST_MapAlgebra(raster, 'float(A)') on a integer raster...

Pierre



More information about the postgis-devel mailing list