Regarding cell size: ArcGIS gives you the option to choose the output cell size, but this is just a resampling operation, not interpolation or anything fancy.<br><br>Conceptually, the largest cell should prevail. Check Geospatial Analysis: A comprehensive guide to principles, techniques and software tools. (this book is also availuable online, for free - i strongly recommend it). Figure 4-35.<br>

<br>Also, in ArcGIS, when you have to truncate a cell (as in the example given) the value of that cell is interpolated to the border, making the operation possible. <br><br>Att.<br><br>George<br><br><div class="gmail_quote">

On Sat, Feb 20, 2010 at 12:57 PM, David Zwarg <span dir="ltr"><<a href="mailto:dzwarg@avencia.com">dzwarg@avencia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">>><br>
>>That sounds like you would want ST_MapAlgebra to look like:<br>
>><br>
>>1- ST_MapAlgebra(rastergrid|geometry, [rastergrid|geometry,...],<br>
>>'mathematical expression', 'rastergrid' |'geometry') -><br>
>>rastergrid/geometry<br>
>><br>
>>where the 1st 'rastergrid' was the master, or:<br>
>><br>
>>2- ST_MapAlgebra(raster|geometry, [raster|geometry,...], 'mathematical<br>
>>expression', 'raster' |'geometry', originx, originy, pixelsizex,<br>
>>pixelsizey) -> raster/geometry<br>
><br>
> Sounds good! (I assume that rastergrid in the first one is actually a raster)<br>
<br>
</div>I wasn't thinking rastergrid would be a raster, I was borrowing from<br>
your idea where you mentioned: "We could also create a RasterGrid kind<br>
of object carrying those four parameters."  So the first method would<br>
be carrying all the position and size parameters inside this<br>
RasterGrid object, whereas the second method would use a basic Raster<br>
object, and explicitly specify the position and size parameters.<br>
<br>
Although, as I think about it more, this RasterGrid is redundant --<br>
aren't all the position, size, and alignment parameters inside of<br>
Raster already?  In that case, then rastergrid is synonymous with<br>
raster, and I didn't fully understand what you meant when you<br>
mentioned creating a RasterGrid object.<br>
<br>
<br>
On a side note, I was looking into the MapAlgebra operations on two<br>
rasters in the same CS, but with different rotations:  the cell size<br>
of the resulting raster (by default) is the smallest cell at 0<br>
rotation that would encapsulate a rotated cell.  In my experiment, I<br>
rotated a raster 45 degrees and did a simple add (A+B).  The input<br>
cell size was 1, and the output cell size was ~1.4, or sqrt(2).<br>
<br>
I'll work on updating the wiki page based on this thread.<br>
<font color="#888888"><br>
Zwarg<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>George R. C. Silva<br><br>Desenvolvimento em GIS<br><a href="http://blog.geoprocessamento.net">http://blog.geoprocessamento.net</a><br>(34) 9664-3717<br>(34) 8843-3717<br>