Saturday, 30 May 2015

Add Oracle Spatial Vector Layer with QGIS 2.0 on Mac OSx


I installed version 2.0 using the recommended mac installer (http://www.kyngchaos.com/software/qgis), and the installation went fine, but there is no option to add an oracle spatial layer (not in the layer dropdown, or the sidebar buttons). I assume this has to do with gdal configuration, but I'm not sure how to fix that. I have the oracle instant client installed, and I can connect to oracle with sqlplus. Has anyone been able to get the new support for oracle to work on a Mac?



Answer




Ok, well, the distributor of the binary for mac osx, replied again, and basically said that one would need to compile QGIS manually. Here are the instructions he posted:



You'll have to compile QGIS yourself...


You need OCI Basic (or Basic Lite) and OCI SDK.


unzip the sdk


unzip basic


rename the clntsh dylib to remove the numbers at the end (should end with .dylib). you can ignore the occi dylib since it's not used. copy libclntsh and libnnz11 to /usr/local/lib


update clntsh with: install_name_tool -id /usr/local/lib/libclntsh.dylib -change /ade/b/2649109290/oracle/ldap/lib/libnnz11.dylib /usr/local/lib/libnnz11.dylib /usr/local/lib/libclntsh.dylib


add to QGIS cmake configure before the last ".." (make sure to fill in correct path to your OCI sdk):


-D WITH_ORACLE=true -D OCI_LIBRARY=/usr/local/lib/libclntsh.dylib \ -D OCI_INCLUDE_DIR=/path/to/unzipped/oci/sdk/include \



"Oh, look, I seem to have fallen down a deep, dark hole. Now what does that >remind me of? Ah, yes - life."


Marvin



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...