Opened 14 years ago
Closed 12 years ago
#739 closed enhancement (fixed)
[raster] UpdateRasterSRID
Reported by: | etiennebr | Owned by: | dustymugs |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.1.0 |
Component: | raster | Version: | master |
Keywords: | history | Cc: |
Description
Maybe it would be more elegant to have a UpdateRasterSRID or a ST_SetSRID(raster) than use the following
alter table <raster> drop constraint enforce_srid_rast; update <raster> set rast = st_setsrid(rast, <srid>); alter table <raster> add constraint enforce_srid_rast CHECK (st_srid(rast) = <srid>);
Change History (9)
comment:1 by , 14 years ago
Component: | postgis → postgis raster |
---|---|
Milestone: | PostGIS 1.5.3 → PostGIS 2.0.0 |
Owner: | changed from | to
Summary: | UpdateRasterSRID → [raster] UpdateRasterSRID |
Version: | 1.5.X → trunk |
comment:2 by , 14 years ago
Milestone: | PostGIS 2.0.0 → PostGIS Raster Future |
---|
comment:3 by , 13 years ago
Milestone: | PostGIS Raster Future → PostGIS Future |
---|
comment:4 by , 12 years ago
comment:5 by , 12 years ago
Isn't calling AddRasterConstraints() also require DDL privileges? Most management function do so no? UpdateRasterSRID would just be one management function among others.
Otherwise, it should not be specific to raster but also take the parameters of a geometry table.
boolean UpdateSRID(name schema, name table, name rastorgeometrycolumn)
comment:6 by , 12 years ago
This seems reasonable to me. Much shorter than remembering the ALTER TABLE .. and ..
comment:7 by , 12 years ago
geometry already has such a function:
http://www.postgis.org/documentation/manual-svn/UpdateGeometrySRID.html
I think it's best not to try to create a generic one UpdateSRID since for geometry the default is typmod and trying to make it an IF geometry then else use constraints will make it complicated.
comment:8 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Thanks robe. That's what I was wondering.
comment:9 by , 12 years ago
Keywords: | history added |
---|---|
Milestone: | PostGIS Future → PostGIS 2.1.0 |
Resolution: | → fixed |
Status: | assigned → closed |
Added in r10581
This seems inappropriate. ALTER and DROP would require DDL privileges. ST_SetSRID(raster) already exists.