Did you check if, even with this error happening, the raster was loaded successfully? I remember having seen this a couple of time but the raster was loaded properly. It might be more like a warning than an error...
Pierre > -----Original Message----- > From: [email protected] [mailto:postgis-users- > [email protected]] On Behalf Of [email protected] > Sent: Friday, October 07, 2011 9:34 AM > To: [email protected] > Subject: [postgis-users] Problems with the storage of raster data, > raster2pgsql.py -errors > > Hi, > > I'm new to this list and also rather new to the work with PostGIS , I used to > work > with it a couple of years ago and started with it again 2 weeks ago. > > Right now I'm experimenting a little bit with the possibilities to store > raster in > PostGIS. I have a PostGIS 2.0 installation on top of PostgreSQL 9.1 (Running > on > Centos 5.7). > What I did is to register 8bit and 16bit GeoTiffs inside postgis, i.e. as > out-db > raster. This works absolutely fine and when I publish this data via geoserver > performance is extremely good! > When I load and store 8bit data inside postgis everything works well, too. But > when I try to load 16bit (the same data which I could register as an out-db > raster in postgis) data I get an error. The error actually already occurs > when I > generate the SQL-file with raster2pgsql. When I execute: > python raster2pgsql.py -r dem_pgin -t public.dem_pgin -s 32632 -k 512x512 -F > - > I -o dem_pgin.sql > > I get the following error: > > Traceback (most recent call last): > File raster2pgsql.py, line 1040, in ? > main() > File raster2pgsql.py, line 1003, in main > gt = wkblify_raster(opts, filename.replace( '\', '/') , i, gt) > File raster2pgsql.py, line 945, in wkblify_raster > summary = wkblify_raster_level(options, ds, options.overview_level, > band_range, infile, i) > File raster2pgsql.py, line 905, in wkblify_raster_level > hexwkb += wkblify_band(options, band, level, xoff, yoff, read_block_size, > block_size, infile, b) > File raster2pgsql.py, line 825, in wkblify_band > hexwkb = binascii.hexlify(out_pixels) > TypeError: non-character (or 8-bit) array cannot be interpreted as character > buffer > > Is this a general issue with 16bit data or is it maybe an error in > raster2pgsql.py > (From some searching it seems to be numpy issue)? > > Any help is appreciated, Cheers > > Torsten > > -------------------------------------------------------------------------- > T-Systems International GmbH > Torsten Drey > Spezialist Geo-Consulting > GeoServices/GIS > Vorgebirgsstraße 49 > D-53119 Bonn > > Fon: +49 (0)228 9841 3690 > Fax: +49 (0)228 9841 3990 > E-Mail: [email protected] <mailto:[email protected]> > Internet: http://www.t-systems.com <http://www.t-systems.com> > > T-Systems International GmbH > Aufsichtsrat: René Obermann (Vorsitzender) > Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Olaf > Heyden, Georg Pepping, Klaus Werner > Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der > Gesellschaft: Frankfurt am Main > > Notice: This transmittal and/or attachments may be privileged or > confidential. If > you are not the intended recipient, you are hereby notified that you have > received this transmittal in error; any review, dissemination, or copying is > strictly > prohibited. If you received this transmittal in error, please notify us > immediately > by reply and immediately delete this message and all its attachments. Thank > you. > > > _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
