[Gdal-dev] OGR Open question perl SWIG

Ethan Alpert ealpert at digitalglobe.com
Fri Nov 11 09:15:19 EST 2005


I'm sorry I did not mention I'm connecting to Oracle. A VIEW is a database concept.
 
Anyhow the reason I present this as a perl SWIG interface question is I can extract data from the same database using the same ExectueSQL using ogr2ogr without problem. However with the perl SWIG interface my code exits immediately on calling ogr::Open(). I do not think this is a driver issue but how the perl swig interface handles the exception that is thrown when OCIDescribeAny (an oracle API function in the oracle driver). I tried calling OGR's DontUseExpceptions() but ogr::Open() still exits. So the question is what does the utility ogr2ogr do that is different than ogr::Open when trying to connect to the same database? Secondly is there a way I can make it not exit on errors but trap them.
 
Sorry for not being more clear.
 
-e

________________________________

From: Ari Jolma [mailto:ari.jolma at tkk.fi]
Sent: Fri 11/11/2005 12:39 AM
To: Ethan Alpert
Cc: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] OGR Open question perl SWIG



Ethan Alpert wrote:

> I'm calling ogr::Open() and it's exiting because some VIEW I don't
> even use does not exist when it calls OCIDescribeAny...


:) sorry, that doesn't tell me anything. Maybe you have some drivers
installed that I do not? But even then I do not understand... what is
VIEW (something SQL/in a database? are you opening a database
datasource?) What's OCIDescribeAny?

The first argument to ogr::Open is a directory or, in the case of
databases, something else and the second is 0 or 1 depending if you want
to open readonly or r/w.

> 
> Anyhow ogr2ogr seems to not exit and does it's thing....Is there some
> way I can configure ogr from perl SWIG to not exit?


I've written so far small apps with ogr (perl module) which change the
SRS of a vector data layer, open and dump a vector layer, or create a
completely new vector layers, and those are working ok. Could you please
post the whole code?

Ari

> 
> Thanks,
> 
> -ethan
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Gdal-dev mailing list
>Gdal-dev at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/gdal-dev
>


--
Prof. Ari Jolma
Kartografia ja Geoinformatiikka / Cartography and Geoinformatics
Teknillinen Korkeakoulu / Helsinki University of Technology
POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20051111/8f4d468c/attachment.html


More information about the Gdal-dev mailing list