[postgis-users] ST_Reclass - oposit direction in reclass
Stanislav Vanecek
S.Vanecek at dhi.cz
Tue Dec 13 00:11:00 PST 2011
Hi Bborie
The SQL is
SELECT ST_AsTIFF(ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(rast),ST_Reclass(rast,1, '0-2115):255-0'::text, '8BUI'::text,0)),ST_Reclass(rast,1, '0-2115):255-0'::text, '8BUI'::text,0)),ST_Reclass(rast,1, '0-2115):255-0'::text, '8BUI'::text,0))
And in this case the result is white rectangle
What I am doing wrong?
Best regards
Standa
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bborie Park
Sent: Monday, December 12, 2011 4:41 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] ST_Reclass - oposit direction in reclass
On Mon, Dec 12, 2011 at 6:42 AM, Stanislav Vanecek <S.Vanecek at dhi.cz> wrote:
> Hi
> I am using the ST_Reclass to create 3-band TIFF (for graphical
> presentation) from 1 band grid 32BF (using algorithm described in 32BF
> http://postgis.refractions.net/documentation/manual-svn/RT_ST_Reclass.ht
> ml)
> The problem is, then for the mapping both intervals in (reclassexpr
> text) must be increasing - values from small to high is mapped to
> colors from "small to high" = (black to white for example) - and I like
> to have them in opposite order.
> I am working with the big rasters (2000 x 2000 cells). In this case the
> ST_Reclass is already not very fast - and when I try to use map algebra
> it was very, very slow.
> Did someone have idea how to speed up?
Standa,
Can you post your SQL? I don't think there is anything restricting
you from having your intervals from high to low instead of low to
high, but I could be wrong. ST_Reclass should be faster than
ST_MapAlgebra as all evaluations are done in C instead of going back
and forth with the PostgreSQL server.
-bborie
--
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list