[postgis-users] Error Using WKTRASTER!

Jorge Arévalo jorge.arevalo at gmail.com
Mon Feb 1 03:12:51 PST 2010


Correct me if I'm wrong (I'm not a Windows user), but FWTools may use the
old python bindings. That is:

import gdal;

instead of

from osgeo import gdal;

So, from my point of view, 2 fast solutions are:

- Use OSGeo4W instead of FWTools, at least for gdal2wktraster.py execution (
http://osgeo4w.osgeo.org/)
- "Hack" gdal2wktraster code using try - except:

try:
   from osgeo import gdal
except ImportError:
   import gdal


On Mon, Feb 1, 2010 at 11:06 AM, mukesh karanwal
<mukesh_karanwal at yahoo.com>wrote:

> Yeah, I had gone through this article and installed FW Tools still the
> problem remains the same!!
> do i need to change the system path and Gdal_Data variables again?
>
>
> --- On *Mon, 2/1/10, Jorge Arévalo <jorge.arevalo at gmail.com>* wrote:
>
>
> From: Jorge Arévalo <jorge.arevalo at gmail.com>
> Subject: Re: [postgis-users] Error Using WKTRASTER!
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Date: Monday, February 1, 2010, 12:33 PM
>
>
> On Mon, Feb 1, 2010 at 6:49 AM, mukesh karanwal <mukesh_karanwal at yahoo.com<http://us.mc459.mail.yahoo.com/mc/compose?to=mukesh_karanwal@yahoo.com>
> > wrote:
>
>>   Hi,
>>
>> I am trying to load raster data (Goetiff file) using "wktRaster" with the
>> following command:
>>
>> *C:\Program Files\..\..>gdal2wktraster.py -r utmfile.tif -t utmtable -o
>> utmfile.sql*
>> As i execute this command from command prompt, it gives the following
>> error:
>>
>> *File "C:\Program Files\..\..>gdal2wktraster.py" , line 32, in <module>*
>> *        from osgeo import gdal*
>> *        import error: no module named osgeo*
>>
>> I am having Python 2.5 with
>> system path: C:\gdalwin32-1.6\bin
>> GDAL_DATA:  C:\gdalwin32-1.6\data
>>
>> how can i get rid of this error and store geotiff file in postgresql ?
>>
>>
>> With Regards,
>> Mukesh
>>
>>
> Hi Mukesh,
>
> Probably, the solution to your problem is here:
>
> http://lists.osgeo.org/pipermail/gdal-dev/2009-December/022916.html
>
> Best regards,
> Jorge
>
>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net<http://us.mc459.mail.yahoo.com/mc/compose?to=postgis-users@postgis.refractions.net>
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>
> -----Inline Attachment Follows-----
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net<http://us.mc459.mail.yahoo.com/mc/compose?to=postgis-users@postgis.refractions.net>
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100201/32d0657a/attachment.html>


More information about the postgis-users mailing list