I'm trying to create an OGR file that can be opened in QGIS that pulls in vector data from an Oracle Database. I've tried a few combinations of things but can't seem to get anything to work. I've few questions if anyone could help:

  1. Does the file need to be .ovf or a .vrt? Does this matter?

  2. Can the OGR file use oracle spatial geometry or do you have to encode it from data in the columns?

  3. The connection string I've used is in the format username/password@databasename. I have Oracle instant client installed (which works correctly with other applications). Is this all you need in the connection string or do you need the full URL + Port number for the database and also the schema?

Thanks very much for any help!

    <OGRVRTLayer name="TEST_LAYER_NAME">
        <GeometryField encoding="PointFromColumns" x="EASTINGS" y="NORTHINGS"/>
  • Is there a specific reason why you don't use Add Oracle Layer? – underdark May 7 '14 at 10:25
  • It's a very large database with lots of tables in each schema. Consequently, if you use Add Oracle Layer, it takes a long time to open up the list of tables and add one, even if you limit with a search filter or remove those without geometry. I want to create a load of table shortcuts using OGR files to get round this. – user29976 May 7 '14 at 10:29

Version 2.4 of Qgis has Layer Files (QLR) which can be used instead of OVF/VRT files to do this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.