[postgis-devel] WKTRaster ST_MapAlgebra

David Zwarg dzwarg at avencia.com
Tue Feb 9 13:51:39 PST 2010


Great.

I have some ArcGIS and GRASS -- I'll see what their restrictions are, and
use that as a guideline for now.

On a side note, I emailed Even, and he was kind enough to provide code for
his expression parser.

Zwarg

On Tue, Feb 9, 2010 at 4:29 PM, Pierre Racine
<Pierre.Racine at sbf.ulaval.ca>wrote:

>  This is a good question…
>
>
>
> I guess users would expect the same kind of result as in any GIS package:
> The pixel values used to compute the mathematical expression SHOULD
> spatially overlap.
>
>
>
> For operations like this in general, PostGIS assume that involved layers
> are in the same coordinate system. There is no such things as automatic on
> the fly layer reprojection. I don’t remember if it warn you if it you
> attempt an operation on two layers projected in two different CS.
>
>
>
> Now what to do when the rasters ovelaps but the pixel sizes are different?
> Or when they have different rotations? What does GRASS does? What does
> ArcGIS does? Whar R does? I would definitely play with those before
> designing anything. We should design the rules involved in this kind of
> function so we can reuse them when we are confronted to similar alignment
> problem in other functions (Intersection(raster, raster)->raster,
> ST_Difference(raster A, raster B)->raster, i.e. most functions taking two or
> more overlapping rasters and returning one raster).
>
>
>
> You also always have to decide what will be the CS, alignment and pixel
> size of the resulting raster. You can impose the ones of one of the raster
> involved (the “master raster”) with an integer parameter specifying the
> index of the “master raster”. You could also supply variant of the function
> allowing to specify these params. Do we want to realign/resample slave
> rasters before doing te operation. This does not seems very efficient but
> maybe there is no other real avenue.
>
>
>
> For sure the challenge is huge. I would maybe start by implementing
> supports for operations on a single raster, delaying problems of alignment
> for later.
>
>
>
> Pierre
>
>
>
> *From:* postgis-devel-bounces at postgis.refractions.net [mailto:
> postgis-devel-bounces at postgis.refractions.net] *On Behalf Of *David Zwarg
> *Sent:* 9 février 2010 15:54
> *To:* PostGIS Development Discussion
> *Subject:* [postgis-devel] WKTRaster ST_MapAlgebra
>
>
>
> Greetings,
>
> I was reviewing the working spec (
> http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03), and
> thinking about ST_MapAlgebra:
>
> *ST_MapAlgebra(raster|geometry, [raster|geometry,…], ‘mathematical
> expression’, ‘raster’ |’geometry’) -> raster/geometry*
>
> I am considering the following question in the context of using
> ST_MapAlgebra with rasters, and returning a raster. Should this function
> only perform operations on similar rasters?  Meaning: do the georeferencing,
> spatial reference, and pixel size have to be the same in all input rasters?
>
> Thanks,
> Zwarg
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20100209/61b56a7e/attachment.html>


More information about the postgis-devel mailing list