[postgis-users] PostGIS Raster ST_Value ST_SetValue performance

Bborie Park dustymugs at gmail.com
Fri Jun 28 07:42:54 PDT 2013


Hey Miguel,

If you're on PostGIS 2.0, there aren't faster alternatives for
ST_SetValue() and ST_Value(). PostGIS 2.1 (hopefully released in the
next several weeks) brings ST_SetValues() and ST_DumpValues().

As for your specific implementation, You could consider the use of
ST_MapAlgebraFct() where the callback function counts the points
included in the cell.

-bborie

On Fri, Jun 28, 2013 at 2:02 AM, Miguel-Angel Manso-Callejo (UPM)
<m.manso at upm.es> wrote:
> Good morning,
>
> It's my first comment to the email-list.
>
> I'm developing a PLSQL-procedure that generate a raster band counting points
> of a geometry table/layer that are included in a cell. This can be seen as a
> simple clustering algorithm.
>
> To do it, i'm using a cursor and determining the row and column of the pixel
> do an increment operation over pixel value. This is a ST_Value + ST_SetValue
> operation foreach point.
> This is very slow.
>
> In Oracle, this is slow too, but i can take an alternative way. Using a
> Array with binary index simulate the image, and latter when all the point
> has been "mapped" over the matrix transform this to a cellblob and later
> insert it on table that store image.
>
> Have any one in the list any similar experience?
> Can any give me a new orientation?
>
>
> Best regards,
> Miguel A. Manso
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list