Correct me if I'm wrong (I'm not a Windows user), but FWTools may use the old python bindings. That is:<div><br></div><div>import gdal;</div><div><br></div><div>instead of</div><div><br></div><div>from osgeo import gdal;</div>
<div><br></div><div>So, from my point of view, 2 fast solutions are:</div><div><br></div><div>- Use OSGeo4W instead of FWTools, at least for gdal2wktraster.py execution (<a href="http://osgeo4w.osgeo.org/">http://osgeo4w.osgeo.org/</a>)</div>
<div>- "Hack" gdal2wktraster code using try - except:</div><div><br></div><div>try:</div><div> from osgeo import gdal</div><div>except ImportError:</div><div> import gdal</div><div><br></div><div><div><br><div class="gmail_quote">
On Mon, Feb 1, 2010 at 11:06 AM, mukesh karanwal <span dir="ltr"><<a href="mailto:mukesh_karanwal@yahoo.com">mukesh_karanwal@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><div><font face="verdana, helvetica, sans-serif">Yeah, I had gone through this article and installed FW Tools still the problem remains the same!!</font></div>
<div><font face="verdana, helvetica, sans-serif">do i need to change the system path and Gdal_Data variables again?<br></font><br><br>--- On <b>Mon, 2/1/10, Jorge Arévalo <i><<a href="mailto:jorge.arevalo@gmail.com" target="_blank">jorge.arevalo@gmail.com</a>></i></b> wrote:<br>
</div>
<blockquote style="padding-left:5px;margin-left:5px;border-left:rgb(16,16,255) 2px solid"><br>From: Jorge Arévalo <<a href="mailto:jorge.arevalo@gmail.com" target="_blank">jorge.arevalo@gmail.com</a>><br>Subject: Re: [postgis-users] Error Using WKTRASTER!<br>
To: "PostGIS Users Discussion" <<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>><br>Date: Monday, February 1, 2010, 12:33 PM<div><div></div>
<div class="h5"><br><br>
<div>On Mon, Feb 1, 2010 at 6:49 AM, mukesh karanwal <span dir="ltr"><<a href="http://us.mc459.mail.yahoo.com/mc/compose?to=mukesh_karanwal@yahoo.com" rel="nofollow" target="_blank">mukesh_karanwal@yahoo.com</a>></span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:#ccc 1px solid">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div><font face="verdana, helvetica, sans-serif">Hi,</font></div>
<div><font face="verdana, helvetica, sans-serif"></font> </div>
<div><font face="verdana, helvetica, sans-serif">I am trying to load raster data (Goetiff file) using "wktRaster" with the following command:</font></div>
<div><font face="verdana, helvetica, sans-serif"></font> </div>
<div><font face="verdana, helvetica, sans-serif"><strong>C:\Program Files\..\..>gdal2wktraster.py -r utmfile.tif -t utmtable -o utmfile.sql</strong></font></div>
<div><font face="verdana, helvetica, sans-serif">As i execute this command from command prompt, it gives the following error:</font></div>
<div><font face="verdana, helvetica, sans-serif"></font> </div>
<div><font face="verdana, helvetica, sans-serif"><strong>File "C:\Program Files\..\..>gdal2wktraster.py" , line 32, in <module></strong></font></div>
<div><font face="verdana, helvetica, sans-serif"><strong> from osgeo import gdal</strong></font></div>
<div><font face="verdana, helvetica, sans-serif"><strong> import error: no module named osgeo</strong></font></div>
<div><font face="verdana, helvetica, sans-serif"></font> </div>
<div><font face="verdana, helvetica, sans-serif">I am having Python 2.5 with</font></div>
<div><font face="verdana, helvetica, sans-serif">system path: C:\gdalwin32-1.6\bin</font></div>
<div><font face="verdana, helvetica, sans-serif">GDAL_DATA: C:\gdalwin32-1.6\data</font></div>
<div><font face="verdana, helvetica, sans-serif"></font> </div>
<div><font face="verdana, helvetica, sans-serif">how can i get rid of this error and store geotiff file in postgresql ?</font></div>
<div><font face="verdana, helvetica, sans-serif"></font> </div>
<div><font face="verdana, helvetica, sans-serif"> <br>With Regards,</font></div>
<div>Mukesh</div></td></tr></tbody></table><font color="#888888"><br></font></blockquote>
<div><br></div>
<div>Hi Mukesh,</div>
<div><br></div>
<div>Probably, the solution to your problem is here:</div>
<div><br></div>
<div><a href="http://lists.osgeo.org/pipermail/gdal-dev/2009-December/022916.html" rel="nofollow" target="_blank">http://lists.osgeo.org/pipermail/gdal-dev/2009-December/022916.html</a></div>
<div><br></div>
<div>Best regards,</div>
<div>Jorge</div>
<div> </div>
<blockquote class="gmail_quote" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:#ccc 1px solid"><font color="#888888"></font><br>_______________________________________________<br>postgis-users mailing list<br>
<a href="http://us.mc459.mail.yahoo.com/mc/compose?to=postgis-users@postgis.refractions.net" rel="nofollow" target="_blank">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" rel="nofollow" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div><br></div></div>-----Inline Attachment Follows-----<div class="im"><br><br>
<div>_______________________________________________<br>postgis-users mailing list<br><a href="http://us.mc459.mail.yahoo.com/mc/compose?to=postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></div></blockquote></td></tr></tbody></table><br>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div></div>