[postgis-devel] [PostGIS] #552: [wktraster] ST_SetValue is changing the raster
PostGIS
trac at osgeo.org
Wed Jul 28 08:18:06 PDT 2010
#552: [wktraster] ST_SetValue is changing the raster
-----------------------+----------------------------------------------------
Reporter: robe | Owner: pracine
Type: defect | Status: new
Priority: medium | Milestone: WKTRaster 0.1.6
Component: wktraster | Version: 1.5.X
Keywords: |
-----------------------+----------------------------------------------------
Comment(by robe):
Pierre,
Sorry had a type in my query -- here is the full
From help manual
{{{
drop table IF EXISTS dummy_rast;
CREATE TABLE dummy_rast(rid integer, rast raster);
INSERT INTO dummy_rast(rid, rast)
VALUES (1,
('01' -- little endian (uint8 ndr)
||
'0000' -- version (uint16 0)
||
'0000' -- nBands (uint16 0)
||
'0000000000000040' -- scaleX (float64 2)
||
'0000000000000840' -- scaleY (float64 3)
||
'000000000000E03F' -- ipX (float64 0.5)
||
'000000000000E03F' -- ipY (float64 0.5)
||
'0000000000000000' -- skewX (float64 0)
||
'0000000000000000' -- skewY (float64 0)
||
'00000000' -- SRID (int32 0)
||
'0A00' -- width (uint16 10)
||
'1400' -- height (uint16 20)
)::raster
),
-- Raster: 5 x 5 pixels, 3 bands, PT_8BUI pixel type, NODATA = 0
(2, ('01000003009A9999999999A93F9A9999999999A9BF000000E02B274A' ||
'41000000007719564100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEF'
||
'EFCF9FBFDFEFEFDFCFAFEFEFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087040046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665')::raster);
}}}
{{{
SELECT ST_Value(rast, ST_Point(3427927.75, 5793243.95)) As val FROM
dummy_rast where rid = 2
}}}
-- returns 253
{{{
SELECT ST_SetValue(rast, ST_Point(3427927.75, 5793243.95),50) As val
FROM
dummy_rast where rid = 2;
-- then run again
SELECT ST_Value(rast, ST_Point(3427927.75, 5793243.95)) As val FROM
dummy_rast where rid = 2;
}}}
Returns 50.
This is running on PostgreSQL 9.0 Windows if it makes a difference.
Haven't tried on 8.4 or 8.3 yet.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/552#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-devel
mailing list