[postgis-users] raster with pixel < map unit

Rémi Cura remi.cura at gmail.com
Wed Dec 18 08:11:32 PST 2013


Hey list,

again noob question.

It seems impossible to create an empty raster with less than one scale
(takes integer !).
Now when I want to update the scale, the number of pixel is not updated :
Is it normal/what should I do?
Cheers,
Rémi-C

DROP TABLE IF EXISTS patch_to_raster;
CREATE TABLE patch_to_raster(rid serial primary key, rast raster);

--
--delete  from patch_to_raster
INSERT INTO patch_to_raster (rast) VALUES (
ST_MakeEmptyRaster(
1
,1
,upperleftx:=0
,upperlefty:=0
,scalex:=1
, scaley:=1
, skewx:=0
,skewy:=0
--, srid:=932011
) --srid of translated lambert 93 to match laser referential
);
UPDATE patch_to_raster SET rast = ST_SetScale(rast,0.02,0.02)

FROM
SELECT ST_SetScale(rast,0.02,0.02)
FROM patch_to_raster;
 SELECT ST_Summary(rast)
FROM patch_to_raster
--Raster of 1x1 pixels has 0 bands and extent of BOX(0 0,0.02 0.02)


Thanks,

Rémi-C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20131218/cae09d1c/attachment.html>


More information about the postgis-users mailing list