<div dir="ltr">Hey list,<div><br></div><div>again noob question.<br><br></div><div>It seems impossible to create an empty raster with less than one scale (takes integer !).<br>Now when I want to update the scale, the number of pixel is not updated :</div>
<div>Is it normal/what should I do?</div><div>Cheers,</div><div>Rémi-C</div><div><br></div><div><div>DROP TABLE IF EXISTS patch_to_raster;</div><div><span class="" style="white-space:pre"> </span>CREATE TABLE patch_to_raster(rid serial primary key, rast raster);</div>
<div><br></div><div><span class="" style="white-space:pre"> </span>--</div><div><span class="" style="white-space:pre"> </span>--delete from patch_to_raster</div><div><span class="" style="white-space:pre"> </span>INSERT INTO patch_to_raster (rast) VALUES (</div>
<div><span class="" style="white-space:pre"> </span>ST_MakeEmptyRaster(</div><div><span class="" style="white-space:pre"> </span>1</div><div><span class="" style="white-space:pre"> </span>,1</div><div><span class="" style="white-space:pre"> </span>,upperleftx:=0</div>
<div><span class="" style="white-space:pre"> </span>,upperlefty:=0</div><div><span class="" style="white-space:pre"> </span>,scalex:=1</div><div><span class="" style="white-space:pre"> </span>, scaley:=1</div><div><span class="" style="white-space:pre"> </span>, skewx:=0</div>
<div><span class="" style="white-space:pre"> </span>,skewy:=0</div><div><span class="" style="white-space:pre"> </span>--, srid:=932011</div><div><span class="" style="white-space:pre"> </span>) --srid of translated lambert 93 to match laser referential</div>
<div><span class="" style="white-space:pre"> </span>);</div><div>UPDATE patch_to_raster SET rast = ST_SetScale(rast,0.02,0.02)</div><div><br></div><div>FROM </div><div><span class="" style="white-space:pre"> </span>SELECT ST_SetScale(rast,0.02,0.02)</div>
<div><span class="" style="white-space:pre"> </span>FROM patch_to_raster;</div><div><span class="" style="white-space:pre"> </span></div><div><span class="" style="white-space:pre"> </span>SELECT ST_Summary(rast)</div><div>
<span class="" style="white-space:pre"> </span>FROM patch_to_raster</div><div><span class="" style="white-space:pre"> </span>--Raster of 1x1 pixels has 0 bands and extent of BOX(0 0,0.02 0.02)</div></div><div><br><br></div>
<div>Thanks,</div><div><br></div><div>Rémi-C</div></div>