[postgis-users] ST_AsRaster and pixeltype
Pierre Racine
Pierre.Racine at sbf.ulaval.ca
Mon Nov 19 07:28:21 PST 2012
Good catch Michi!
I get the same problem.
Could you fill a ticket about it?
Pierre
> -----Original Message-----
> From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> bounces at lists.osgeo.org] On Behalf Of Michael.Scholz at dlr.de
> Sent: Monday, November 19, 2012 5:04 AM
> To: postgis-users at lists.osgeo.org
> Subject: [postgis-users] ST_AsRaster and pixeltype
>
> Moin!
> ST_AsRaster does not always create a raster with the specified pixel type.
> Instead of a band with 1BB I get one with 8BUI, which is the default according to
> the documentation. Example:
> ---------------------
> CREATE TEMP TABLE foo (rid serial PRIMARY KEY, rast raster);
>
> INSERT INTO foo (rast)
> SELECT ST_AsRaster (ST_MakePolygon (ST_GeomFromText
> ('LINESTRING(604770 5793000, 604870 5793000, 604870 5792900, 604770
> 5793000)',32632)), 0.1, -0.1, '1BB', 1.0, 0.0);
>
> SELECT AddRasterConstraints ('foo'::name,'rast'::name);
>
> SELECT srid,scale_x,scale_y,num_bands,pixel_types,nodata_values
> FROM raster_columns
> WHERE r_table_name = 'foo';
> ---------------------
> The result:
> 32632 | 0.10 | -0.1 | 1 | {8BUI} | {0}
> If I specify 16BUI, I indeed get a 16BUI-band. Is this a special feature of
> ST_AsRaster or some limitation of GDAL?
>
> My version:
> "POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March
> 2012" GDAL="GDAL 1.9.2, released 2012/10/08 GDAL_DATA not found"
> LIBXML="2.7.8" RASTER"
>
> Ciaoi, Michi
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list