span8
span4
span8
span4
Hi all,
I try to access the GDAL library via python to use a format (namely esri personal geodatabase) which my FME installation / licencing doesn't support.
GDAL 2.4.0 and Python for GDAL are installed (everything under 32bit as my Microsoft Access driver is a 32bit installation,according to the manualhttps://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows).In my Command Prompt everything works,except the connection to a *.mdb.The error says:
ERROR 1: Unable to initialize ODBC connection to DSN for DRIVER=Microsoft Access Driver (*.mdb);DBQ=PGeo:electricite.mdb
If you have any advice on this,I'm grateful.Of course I'm checking my drivers,but couldn't find any inconsistencies yet.
Well,my main problem is toaccess the GDAL library within FME PythonCreator.How do I import it?I tried
from osgeo import gdal
but this doesn't work.Do I miss something?
Cheers,
Maria
@gpt_executer: did you get it working?
No,unfortunatly not.As it wasn't too important I stopped working on that.
But still: any tips appreciated!
Just wanted to add that the fmeobjects Python API now has full raster support,which makes it possible to manipulate e.g.pixel values directly in FME python scripts.It may not replace all the functionality of gdal,but it does make a lot of stuff possible.
Have a look at the excellent examples@takashiposted some time ago:
https://knowledge.亚搏在线safe.com/questions/38000/python-fme-objects-api-for-raster-manipulation.html
I've only done this once a long time ago,so I hope my memory isn't too rusty...
You basically have to download and install a stand-alone Python interpreter frompython.org(or,even better,if you can find a distribution that includes gdal out of the box) and point FME to it.If gdal isn't already included,you install it as per the instructions.It should then work in FME as well.
I do seem to remember,however,that getting the gdal Python bindings to work properly on Windows was a royal pain,but hopefully it's gotten better by now.
Regarding your dsn error,youmayhave better luck asking in gdal specific forums,I suspect.
Why use fme over python and arcpy?7 Answers
Dynamic reader parameters0 Answers
Start FME from command line: Wait until translation is finished5 Answers
Running a workspace from cmd.exe2 Answers
© 2019 亚搏在线Safe Software Inc |Legal