[Gdal-dev] OGR Open question perl SWIG

Kevin Ruland kruland at ku.edu
Fri Nov 11 09:55:12 EST 2005


Ethan,

Can you post the Open statement from the Perl script and the command
line for ogr2ogr that you are using?

The exit that you might be experiencing is buried waaay deep in the
gdal/ogr library itself (in the CPL stuff).  It is actually an abort()
in the CPLErrorV() method which is executed for any fatal error.  Are
you getting any messages from CPL?  Any fatal error message should be
printend to console.

I suspect the problem is something to do with quoting differences
between C and Perl.

Kevin

Ethan Alpert wrote:

> 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
> <http://www.tkk.fi/%7Ejolma>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Gdal-dev mailing list
>Gdal-dev at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/gdal-dev
>



More information about the Gdal-dev mailing list