[postgis-tickets] [PostGIS] #2555: [raster]: ST_Reclass Working with negative numbers seems broken
PostGIS
trac at osgeo.org
Sun Dec 1 19:07:57 PST 2013
#2555: [raster]: ST_Reclass Working with negative numbers seems broken
--------------------+-------------------------------------------------------
Reporter: robe | Owner: dustymugs
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.5
Component: raster | Version: 2.0.x
Keywords: |
--------------------+-------------------------------------------------------
Comment(by robe):
http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/tiles/cur/tmean_26.zip
Which I loaded with:
{{{
raster2pgsql -s 4326 -I -C -M tmean/*.bil -F -t 256x256 tmean | psql
}}}
They came in as 16BSI. I just tried your query on this:
{{{
SELECT ST_Value(ST_Reclass(rast, 1, '[-9000-9000]:[-900-900]',
'32BF'),1,1) As new, ST_Value(rast,1,1) As orig
from tmean limit 10;
}}}
and output is:
{{{
new | orig
-----+------
0 | 234
0 | 236
0 | 240
0 | 241
0 | 234
0 | 211
0 | 208
0 | 225
0 | 222
0 | 230
}}}
This is running:
{{{
POSTGIS="2.2.0dev r11899" GEOS="3.4.2-CAPI-1.8.2 r3924" PROJ="Rel. 4.8.0,
6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24 GDAL_DATA not found"
LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY (topology procs from "2.2.0dev
r11808" need upgrade) RASTER
}}}
I've got to check what's up with my GDAL_DATA though I assume that doesn't
matter for this case.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2555#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list