Opened 12 years ago
Closed 12 years ago
#2237 closed defect (fixed)
[raster]: ST_Resize fails with too few parameters for RAISE if dimensions not integer
Reported by: | robe | Owned by: | Bborie Park |
---|---|---|---|
Priority: | critical | Milestone: | PostGIS 2.1.0 |
Component: | raster | Version: | master |
Keywords: | Cc: |
Description
I think this may be a bug in our RAISE notice or something:
Getting this error:
ERROR: too few parameters specified for RAISE CONTEXT: PL/pgSQL function st_resize(raster,double precision,double precision,text,double precision) line 8 at RAISE
and always happens if I'm trying to scale (not using percents) but some multiple of width and height that does not result in integer.
To replicate create table:
CREATE SCHEMA ch07; CREATE TABLE ch07.bag_o_rasters( rid serial primary key , rast_name text, rast raster); INSERT INTO ch07.bag_o_rasters(rast_name, rast) WITH a1 AS ( -- <co id="co_geom_st_asraster_fixed_1" /> -- SELECT ST_Buffer(ST_GeomFromText('LINESTRING(448252 5414206,448289 5414317 ,448293 5414330,448324 5414417,448351 5414495)', 32631), 10) As geom ) SELECT 'squished road', ST_AsRaster(geom,50,500) FROM a1 ;
-- try to resize -- This fails
SELECT ST_Resize(rast,ST_Width(rast)*1.5, ST_Height(rast)*1.5) FROM ch07.bag_o_rasters WHERE rast_name = 'squished road'
-- This works
SELECT ST_Resize(rast,(ST_Width(rast)*1.5)::integer, (ST_Height(rast)*1.5)::integer ) FROM ch07.bag_o_rasters WHERE rast_name = 'squished road'
Change History (2)
comment:1 by , 12 years ago
Component: | postgis → raster |
---|---|
Owner: | changed from | to
Summary: | ST_Resize fails with weird RAISE if dimensions not integer → [raster]: ST_Resize fails with too few parameters for RAISE if dimensions not integer |
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in r11174