[postgis-tickets] [PostGIS] #2986: [raster] raster2pgqsql

PostGIS trac at osgeo.org
Thu Nov 6 00:07:11 PST 2014


#2986: [raster] raster2pgqsql
-------------------------+--------------------------------------------------
 Reporter:  rmorelli     |       Owner:  dustymugs    
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.1.5
Component:  raster       |     Version:  2.1.x        
 Keywords:               |  
-------------------------+--------------------------------------------------
 I've been dealing with loading a bunch of rasters in a table using -F
 option.
 When coming to play with mapserver postgis raster LAYER definition(s) (ie
 DATA statement) I've found that using WHERE clause on the "filename" field
 is really a mess because escaping doesn't work (1).

 Querying an integer data type field (as in the 2nd example in
 http://postgis.net/docs/RT_FAQ.html#idp61699792) works smoothly.

 So, could you consider adding a cli option in order to add a new column of
 integer data type? Maybe casting filename (text) into id (int)?
 eg. my workaround has been: adding a new integer column and then use
 "UPDATE raster.dem SET id=CAST(substring(filename FROM '_(.*?)\.') AS
 integer);"

 Hope this was clear.
 Regards
 Raffaele

 PS really don't know if this should be also reported to mapserver devs,
 anyway knwoledge is useful.

 ---------------------------------------------------
 (1)
 DATA "PG:host=localhost port=5432 dbname='xxx' user='xxx' password='xxx'
 schema='raster' table='dem' where='filename=\'dem20_12.tif\'' mode='2'"

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2986>
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