<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16671"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial>Andreas,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial>Nope haven't seen that error before.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial>I take it this used to work for you - 
gdal2wtraster.py.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial>Which version of gdal are you running under 
python?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial>FWIW -- we don't run it like that -- we run with the -o output 
file swithin. I'm not sure the way you are running it works or 
not</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial>So try</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial><FONT color=#000000 size=3 
face="Times New Roman">c:\Python25\python 
c:\wktraster_pg84\bin\gdal2wktraster.py -r c:\pri</FONT><FONT color=#000000 
size=3 face="Times New Roman">o_grid\source\forest\fcworld.img -t forest -s 4326 
-I <SPAN class=891112705-26102010> -o 
</SPAN> C:\prio_grid\source\gpw\forest.sql</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010></SPAN> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010>and see if you have any better 
luck.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010>Alternatively you can try the new postgis raster 
packaged with PostGIS 2.0 and use the gdal2raster.py.  It has some minor 
fixes in it.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010>Although its in 2.0, at the moment the rtpostgis*.dll 
is still a separate binary and doesn't YET have any direct dependency on 
postgis-2.0.dll (and has a few more functions that the old wktraster 
project is missing. So you can grab it from there and use with your 
PostGIS 1.5/1.4  or whatever 
install.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010>This MAY CHANGE when PostGIS 2.0 finally 
comes out.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010>We'll also be releasing a new windows binaries of 
PostGIS 2.0 in the next day or so.  The dll in that build will change from 
rtpostgis.dll to rtpostgis-2.0.dll, but will still be pretty much the same 
functionality.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=891112705-26102010></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial>Leo and Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial><A 
href="http://www.postgis.us">http://www.postgis.us</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=891112705-26102010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT size=2 face=Tahoma><B>From:</B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
</B>Andreas Forø Tollefsen<BR><B>Sent:</B> Monday, October 25, 2010 8:04 
AM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> [postgis-users] WKT 
Raster Error<BR></FONT><BR></DIV>
<DIV></DIV>Anyone familiar with the below error?
<DIV>I have never experienced it before when importing rasters:</DIV>
<DIV><BR></DIV>
<DIV>
<DIV>C:\Python25>c:\Python25\python c:\wktraster_pg84\bin\gdal2wktraster.py 
-r c:\pri</DIV>
<DIV>o_grid\source\forest\fcworld.img -t forest -s 4326 -I > 
C:\prio_grid\source\gpw\</DIV>
<DIV>forest.sql</DIV>
<DIV>c:\wktraster_pg84\bin\gdal2wktraster.py:645: DeprecationWarning: integer 
argumen</DIV>
<DIV>t expected, got float</DIV>
<DIV>  hexstr = binascii.hexlify(struct.pack(fmt_little, 
data)).upper()</DIV>
<DIV>Traceback (most recent call last):</DIV>
<DIV>  File "c:\wktraster_pg84\bin\gdal2wktraster.py", line 1014, in 
<module></DIV>
<DIV>    main()</DIV>
<DIV>  File "c:\wktraster_pg84\bin\gdal2wktraster.py", line 977, in 
main</DIV>
<DIV>    wkblify_raster(opts, filename, i)</DIV>
<DIV>  File "c:\wktraster_pg84\bin\gdal2wktraster.py", line 922, in 
wkblify_raster</DIV>
<DIV>    summary = wkblify_raster_level(options, ds, 
options.overview_level, band_ran</DIV>
<DIV>ge, infile, i)</DIV>
<DIV>  File "c:\wktraster_pg84\bin\gdal2wktraster.py", line 889, in 
wkblify_raster_le</DIV>
<DIV>vel</DIV>
<DIV>    hexwkb += wkblify_band(options, band, level, xoff, yoff, 
read_block_size, bl</DIV>
<DIV>ock_size, infile, b)</DIV>
<DIV>  File "c:\wktraster_pg84\bin\gdal2wktraster.py", line 778, in 
wkblify_band</DIV>
<DIV>    target_block_size[0], target_block_size[1])</DIV>
<DIV>  File "C:\Python25\Lib\site-packages\osgeo\gdal.py", line 835, 
in ReadAsArray</DIV>
<DIV>    buf_xsize, buf_ysize, buf_obj )</DIV>
<DIV>  File "C:\Python25\Lib\site-packages\osgeo\gdal_array.py", line 
138, in BandRea</DIV>
<DIV>dAsArray</DIV>
<DIV>    buf_xsize, buf_ysize, datatype )</DIV>
<DIV>  File "C:\Python25\Lib\site-packages\osgeo\gdal.py", line 760, 
in ReadRaster</DIV>
<DIV>    return _gdal.Band_ReadRaster(*args, **kwargs)</DIV>
<DIV>MemoryError</DIV></DIV></BODY></HTML>