Re: Re: [gdal-dev] question about georaster and python

Ivan Lucena ivan.lucena at pmldnet.com
Sun Dec 20 21:40:03 EST 2009


Hi,

The call to CreateCopy will call the C++ method of the same name on the driver. Right, that is the same method that gdal_translate calls. So you get the same performance in Python as in gdal_translate.

You can take a look at how to run PL/SQL statement on Python using cx_Oracle from here:

http://www.oracle.com/technology/pub/articles/devlin-python-oracle.html
http://www.oracle.com/technology/pub/articles/prez-python-queries.html

And good luck with that.

>  -------Original Message-------
>  From: gispowerfan <gispowerfan at gmail.com>
>  Subject: Re: Re: [gdal-dev] question about georaster and python
>  Sent: Dec 20 '09 20:51
>  
>  
>  thanks! but I think that the method   you mentioned will depress the
>  performance, for example, when using the   python driver.CreateCopy(source,
>  "geor:user/pwd at db,tab,col", <create options>),   in fact it will use the
>  gdal_translate function. And the performance   of PL/SQL will exceed the
>  gdal_translate. so I want to use cx_Oracle, but I   don't know how to use
>  PL/SQL by cx_Oracle.
>  
>  
>  2009-12-21
>  --------------------
>  
>  gispowerfan
>  --------------------
>  
>   Ivan
>   2009-12-21  02:11:53
>   gispowerfan
>   gdal-dev
>   Re: [gdal-dev] question   about georaster and python
>  
>  
>  gispowerfan wrote:
>  > hi list,
>  >
>  >  I have a question about georaster and python, it's maybe not related to
>  
>  > GDAL code directly, but I think it is related question.
>  > Now I want to connect to ORACLE by cx_Oracle(which is Python interface
>  to ORACLE), I can use cx_Oracle to create table,insert simple data,
>  > but can't run the image loader pl/sql, do anyone have any idea? I don't
>  know whether or not that some image loader pl/sql can run by cx_Oracle?
>  > I know that I can use gdal python interface to connect Georaster, but I
>  
>  > need to test the performance.
>  > thanks in advance.
>  >
>  > 2009-12-20
>  > ------------------------------------------------------------------------
>  
>  > gispowerfan
>  >
>  >
>  > ------------------------------------------------------------------------
>  
>  >
>  > _______________________________________________
>  > gdal-dev mailing list
>  > gdal-dev at lists.osgeo.org
>  > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>  
>  Example:
>  
>  >>> from osgeo import gdal
>  >>> driver = gdal.GetDriverByName("georaster")
>  >>> source = gdal.Open("example.tif")
>  >>> target = driver.CreateCopy(source, "geor:user/pwd at db,tab,col",
>  <create options>)
>  >>> target = None
>  >>> source = None
>  
>  That would load the geotiff file to GeoRaster.


More information about the gdal-dev mailing list