[postgis-devel] WKTRaster ST_MapAlgebra

George Silva georger.silva at gmail.com
Sat Feb 20 07:24:34 PST 2010


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.

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.

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.

Att.

George

On Sat, Feb 20, 2010 at 12:57 PM, David Zwarg <dzwarg at avencia.com> wrote:

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



-- 
George R. C. Silva

Desenvolvimento em GIS
http://blog.geoprocessamento.net
(34) 9664-3717
(34) 8843-3717
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20100220/47f0a4ce/attachment.html>


More information about the postgis-devel mailing list