Opened 13 years ago

Closed 13 years ago

#989 closed defect (wontfix)

[raster] gdal2wktraster.py has trouble with GRD files

Reported by: dondrake Owned by: pracine
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: master
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 (9)

comment:1 by dondrake, 13 years ago

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

comment:2 by strk, 13 years ago

Component: postgispostgis raster
Owner: changed from pramsey to pracine

comment:3 by pracine, 13 years ago

Summary: [wktraster] gdal2wktraster.py has trouble with GRD files[raster] gdal2wktraster.py has trouble with GRD files

Could you put the file on a FTP site?

comment:4 by dondrake, 13 years ago

You can download the file here:

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

Thanks.

-Don

comment:5 by etiennebr, 13 years ago

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

comment:6 by pracine, 13 years ago

Milestone: PostGIS 1.5.3PostGIS 2.0.0
Version: 1.5.Xtrunk

comment:7 by dondrake, 13 years ago

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

pracine, were you able to duplicate?

comment:8 by etiennebr, 13 years ago

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

comment:9 by dustymugs, 13 years ago

Resolution: wontfix
Status: newclosed

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.