Ticket #989 (closed defect: wontfix)

Opened 2 years ago

Last modified 17 months ago

[raster] gdal2wktraster.py has trouble with GRD files

Reported by: dondrake Owned by: pracine
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: trunk
Keywords: Cc:

Description

I get some strange warning when running gdal2wktraster.py:

-bash-3.2$ /usr/local/pgsql/bin/gdal2wktraster.py -s 4326 -M -I -k 256x256 -r /tmp/test.grd -t x > /tmp/sql.sql /usr/local/pgsql/bin/gdal2wktraster.py:645: DeprecationWarning?: integer argument expected, got float

hexstr = binascii.hexlify(struct.pack(fmt_little, data)).upper()

-bash-3.2$

When viewing this raster using MapServer?, it never appears. Other rasters (grc, tiff, etc.) appear just fine.

Change History

Changed 2 years ago by dondrake

BTW, I was going to attach the file, but it is over 10MB in size.

Changed 2 years ago by strk

  • owner changed from pramsey to pracine
  • component changed from postgis to postgis raster

Changed 2 years ago by pracine

  • summary changed from [wktraster] gdal2wktraster.py has trouble with GRD files to [raster] gdal2wktraster.py has trouble with GRD files

Could you put the file on a FTP site?

Changed 2 years ago by dondrake

You can download the file here:

 http://dl.dropbox.com/u/26849978/test.grd

Thanks.

-Don

Changed 2 years ago by etiennebr

Don, I had no problem loading test.grd with gdal2wktraster.py (5713 2010-06-29 15:39:24Z) I loaded many of my own .grd rasters as well. I don't know if it will help narrow the possibilities, but I'm using GDAL 1.8. -- Etienne

Changed 2 years ago by pracine

  • version changed from 1.5.X to trunk
  • milestone changed from PostGIS 1.5.3 to PostGIS 2.0.0

Changed 2 years ago by dondrake

Etienne, you didn't get any warnings? I am also running GDAL 1.8 64-bit Linux.

pracine, were you able to duplicate?

Changed 2 years ago by etiennebr

You're right, I got a warning with your file(I missed it on first time because I was in verbose mode): DeprecationWarning?: integer argument expected, got float hexstr = binascii.hexlify(struct.pack(fmt_little, data)).upper()

But I doubt it is linked to grd as

gdal_translate test.grd test.tif

Input file size is 2334, 2467 Warning 1: Unable to export GeoTIFF file with different datatypes per different bands. All bands should have the same types in TIFF. 0...10...20...30...40...50...60...70...80...90...100 - done.

and then same warning with raster2pgsql.py --raster=test.tif (even if it switched band 4 type to byte)

Hope it can help you Pierre...

-- Etienne

Changed 17 months ago by dustymugs

  • status changed from new to closed
  • resolution set to wontfix

Won't fix as Python is no longer required as of r8369 as the Python version of raster2pgsql.py is no longer supported.

Note: See TracTickets for help on using tickets.