[postgis-users] error running St_MapAlgebraExpr 2 raster version

Silver Ashen silver.ashen at gmail.com
Tue Feb 19 16:01:14 PST 2013


Thank you very much for the explanations.

Indeed, with a St_Value, I can assess that the request worked, but without
opening the result in ArcGIS (its plant), this notice message make me doubt.

Samy
2013/2/20 dustymugs <dustymugs at gmail.com>

> The only problem you have in your query is the expression being provided
> to ST_MapAlgebraExpr().  That expression should be:
>
> [rast1.val]*[rast2.val]
>
> The notice itself can safely be ignored.  In the normal use case, your
> source rasters are tiled into smaller chucks.  And between these smaller
> chucks, some of these tiles will not intersect.
>
> +---+---+---+
> |   |   |   |
> +---+---+---+
> |   |   |   |
> +---*---*---*---+
> |   |   |   |   |
> +---*---*---*---+
>     |   |   |   |
>     +---+---+---+
>     |   |   |   |
>     +---+---+---+
>
> If you were to look at the text figure above, the two rasters intersect.
>  But some of the smaller chucks when compared would not.
>
> -bborie
>
> On 02/19/2013 03:30 PM, Silver Ashen wrote:
> > Hello everybody,
> >
> > I'm trying to test the St_MapAlgebraExpr 2 raster version in order to
> > multiply the values of a raster by the values of an other one.
> >
> > Here is the request :
> >
> > SELECT St_MapAlgebraExpr(a.rast,b.rast,'(a.rast*b.rast)::double
> > precision','32BF','INTERSECTION','NULL','NULL',-1) As rast
> > FROM sigma.mnt_5m_2941x6197 as a, sigma.affor_aligned2 as b WHERE
> > St_Intersects(a.rast,b.rast);
> >
> > Note that affor_aligned2 was a vector rasterized with St_AsRaster in the
> > way that it's fit the alignment of mnt_5m_2941x6197.
> >
> > However, the function above returns the following :
> >
> > "Notice : The two rasters provided have no intersection.  Returning no
> band
> > raster"
> >
> > I don't understand because when I look to the two raster in ArcGIS, there
> > is no problem of srid. The two layers are well overlayed...
> >
> >  I don't understand what I did wrong. Any idea ?
> >
> > Thanks,
> > Samy
> >
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> >
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130220/9b7cbd4b/attachment.html>


More information about the postgis-users mailing list