[postgis-users] gdal2wktraster.py wildchar not working

Ralf Suhr Ralf.Suhr at itc-halle.de
Fri Jul 23 01:39:24 PDT 2010


Hi Sebastian,

your provided SRID is not in spatial_ref_sys.

    psql:ok.sql:3: ERROR:  Invalid SRID

Gr
Ralf

Am Freitag 23 Juli 2010, 10:12:34 schrieb Sebastian E. Ovide:
> Agree...
> 
> by the way, the script finished in only 10 minutes and it has created a
> file of 35GB ! Still I cannot compare it with Oracle as I do not know yet
> how much space it will consume inside PG (in oracle it consumes around
> 16GB if not compressed and around 300M if compressed)
> 
> sebas at SeansPC:~/rasters$ ls -lh ok.sql
> -rw-r--r-- 1 sebas sebas 35G 2010-07-22 17:52 ok.sql
> 
> running the sql with psql I'm getting only errors:
> 
> sebas at SeansPC:~/rasters$ time psql -d sebas -h 10.0.1.50 -U sebas -f ok.sql
> BEGIN
> psql:ok.sql:2: NOTICE:  CREATE TABLE will create implicit sequence
> "sebastable_rid_seq" for serial column "sebastable.rid"
> psql:ok.sql:2: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit
> index "sebastable_pkey" for table "sebastable"
> CREATE TABLE
> psql:ok.sql:3: ERROR:  Invalid SRID
> CONTEXT:  SQL statement "SELECT AddRasterColumn('', $1 , $2 , $3 , $4 , $5
> , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 )"
> PL/pgSQL function "addrastercolumn" line 4 at SQL statement
> psql:ok.sql:4: ERROR:  current transaction is aborted, commands ignored
> until end of transaction block
> psql:ok.sql:5: ERROR:  current transaction is aborted, commands ignored
> until end of transaction block
> psql:ok.sql:6: ERROR:  current transaction is aborted, commands ignored
> until end of transaction block
> psql:ok.sql:7: ERROR:  current transaction is aborted, commands ignored
> until end of transaction block
> psql:ok.sql:8: ERROR:  current transaction is aborted, commands ignored
> until end of transaction block
> psql:ok.sql:9: ERROR:  current transaction is aborted, commands ignored
> until end of transaction block
> p
> 
> any ideas ?
> 
> On Thu, Jul 22, 2010 at 6:55 PM, Pierre Racine
> 
> <Pierre.Racine at sbf.ulaval.ca>wrote:
> > Well it's still a bug that the process fail without the -k option, but we
> > can lower the priority. If we could have one of those rasters...
> > 
> > Pierre
> > 
> > >-----Original Message-----
> > 
> > >From: postgis-users-bounces at postgis.refractions.net [mailto:
> > postgis-users-
> > 
> > >bounces at postgis.refractions.net] On Behalf Of Jorge Arévalo
> > >Sent: 22 juillet 2010 12:56
> > >To: PostGIS Users Discussion
> > >Subject: Re: [postgis-users] gdal2wktraster.py wildchar not working
> > >
> > >On Thu, Jul 22, 2010 at 6:45 PM, Sebastian E. Ovide
> > >
> > ><sebastian.ovide at gmail.com> wrote:
> > >> Hi Jorge,
> > >> 
> > >>  running the same gdal2wktraster script with those options that have
> > >> 
> > >> suggested have fixed the error...
> > >> 
> > >> i.e:
> > >> 
> > >> sebas at SeansPC:~/rasters$ time ./gdal2wktraster.py -k 512x512 -s 81989
> > 
> > -I -r
> > 
> > >> raster/ -t sebastable -o ok.sql
> > >> ./gdal2wktraster.py:727: DeprecationWarning: integer argument
> > >> expected,
> > 
> > got
> > 
> > >> float
> > >> 
> > >>   hexwkb += wkblify(pt2fmt(pixtype), nodata)
> > >> 
> > >> that means that if the image is too big, "-k is mandatory" (probably
> > >> it should be set with some default...)
> > >> 
> > >> I have to go now.. if it gives any error I'll let you know !
> > >> 
> > >> thanks
> > >
> > >Great. So, we only have to focus on the wildcard problem. Keep us
> > >informed if you experiment more problems :-)
> > >
> > >Best regards,
> > >Jorge
> > >
> > >> 2010/7/22 Jorge Arévalo <jorge.arevalo at deimos-space.com>
> > >> 
> > >>> Hi Sebastian,
> > >>> 
> > >>> On Wed, Jul 21, 2010 at 6:35 PM, Sebastian E. Ovide
> > >>> 
> > >>> <sebastian.ovide at gmail.com> wrote:
> > >>> >> Also, normally you will also want to retile your smaller rasters
> > 
> > with
> > 
> > >>> >> the
> > >>> >> -k option to tiles (something like 100x100 or 200x200), specify
> > >>> >> the reference system with the -s option and create an index with
> > >>> >> the -I option.
> > >>> >> Did you read the tutorial?
> > >>> > 
> > >>> > it should not matter for gdal2wktraster.py right ?
> > >>> 
> > >>> Could you please provide a link to download the big raster that
> > >>> caused the first problem in Linux? We're trying to reproduce it, in
> > >>> the same conditions. You should be able to deal with big rasters by
> > >>> splitting them into small blocks by using -k option to specify the
> > >>> size of the blocks, and -I option to create an index, without using
> > >>> any other tool before.
> > >>> 
> > >>> About the wildcard problem, we're working on it too. Thanks for
> > 
> > reporting
> > 
> > >>> it.
> > >>> 
> > >>> Best regards,
> > >>> Jorge
> > >>> 
> > >>> >> Pierre
> > >>> >> 
> > >>> >> 
> > >>> >> 
> > >>> >> From: postgis-users-bounces at postgis.refractions.net
> > >>> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf
> > >>> >> Of Sebastian E. Ovide
> > >>> >> Sent: 21 juillet 2010 04:15
> > >>> >> To: PostGIS Users Discussion
> > >>> >> Subject: [postgis-users] gdal2wktraster.py wildchar not working
> > >>> >> 
> > >>> >> 
> > >>> >> 
> > >>> >> Hi All,
> > >>> >> 
> > >>> >> as gdal2wktraster.py has a bug that prevents importing big
> > >>> >> rasters,
> > 
> > I
> > 
> > >>> >> have
> > >>> >> split the raster using
> > >>> >> 
> > >>> >> gdal_retile.py -v -ps 10000 10000 -targetDir test test.png
> > >>> >> 
> > >>> >> I created a lot of tif files...
> > >>> >> 
> > >>> >> then I've tried to create a sql with this:
> > >>> >> 
> > >>> >> ./gdal2wktraster.py -r test/*.tif -t newtable -o newtable.sql
> > >>> >> 
> > >>> >> and gdal2wktraster.py read only 1 file:
> > >>> >> 
> > >>> >> sebas at SeansPC:~/rasters$ ./gdal2wktraster.py -r test/*.tif -t
> > 
> > newtable
> > 
> > >>> >> -o
> > >>> >> newtable.sql
> > >>> >> ------------------------------------------------------------
> > >>> >> 
> > >>> >>  Summary of GDAL to WKT Raster processing:
> > >>> >> ------------------------------------------------------------
> > >>> >> Number of processed raster files: 1 (test/test_01_01.tif)
> > >>> >> List of generated tables (number of tiles):
> > >>> >> 1       newtable (1)
> > >>> >> 
> > >>> >> 
> > >>> >> any other easy way to import big rasters ?
> > >>> >> 
> > >>> >> 
> > >>> >> 
> > >>> >> --
> > >>> >> Sebastian E. Ovide
> > >>> >> 
> > >>> >> 
> > >>> >> 
> > >>> >> _______________________________________________
> > >>> >> postgis-users mailing list
> > >>> >> postgis-users at postgis.refractions.net
> > >>> >> http://postgis.refractions.net/mailman/listinfo/postgis-users
> > >>> > 
> > >>> > --
> > >>> > Sebastian E. Ovide
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > _______________________________________________
> > >>> > postgis-users mailing list
> > >>> > postgis-users at postgis.refractions.net
> > >>> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > >>> 
> > >>> _______________________________________________
> > >>> postgis-users mailing list
> > >>> postgis-users at postgis.refractions.net
> > >>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> > >> 
> > >> --
> > >> Sebastian E. Ovide
> > >> 
> > >> 
> > >> 
> > >> 
> > >> _______________________________________________
> > >> postgis-users mailing list
> > >> postgis-users at postgis.refractions.net
> > >> http://postgis.refractions.net/mailman/listinfo/postgis-users
> > >
> > >_______________________________________________
> > >postgis-users mailing list
> > >postgis-users at postgis.refractions.net
> > >http://postgis.refractions.net/mailman/listinfo/postgis-users
> > 
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users

MfG
Ralf Suhr



More information about the postgis-users mailing list