13

Is anyone aware of any plugins, or any other way to connect and view data from an ArcSDE database in QGIS desktop?

  • You can connect directly to the underlying database (PostGIS, Oracle or personal geodatabase), there should be no need (and maybe no way) to use ArcSDE as middle-ware. – underdark Jul 23 '10 at 18:57
  • How does MapServer do it? It's C and OGR based, and so is QGIS. Maybe there's a way like Matt Wilkie says. – Duarte Carreira Nov 17 '10 at 12:15
  • If the spatial data is stored in SDEBINARY rather than the native oracle SDO_GEOMETRY or ST_GEOMETRY data types I think the only way to read it would be through ArcSDE? We have this issue with Geoserver where only the tables setup with SDO_GEOMETRY can be viewed with the Oracle connection, for our other legacy data we have to use the ArcSDE plugin. – kes May 30 '16 at 8:55
4

It may be possible to build a bridge through GDAL/OGR's ArcSDE driver. It's not compiled in by default and needs some pieces of the ESRI SDE C API to connect. So to build this driver you need to have a copy of the SDE C API developer kit from ESRI. If memory serves, there is a pre-compiled sde driver floating around that can use ArcInfo Workstation installed on the local machine in place of the SDK.

Sources:

  • I think the ArcInfo thing was only for reading ArcInfo binary coverages from GDAL. It has long since been deprecated. – Howard Butler Sep 29 '11 at 14:44
6

I am glad to say I have it working! I'm using QGIS 1.7 from OSGeo4W:

  1. get the ogr_sde.dll (compile it from Tamas, you also need some ArcSDE SDK files)
  2. replace the gdal18.dll used by qgis with the one you compiled above
  3. put ogr_sde.dll in C:\OSGeo4W\bin\gdalplugins\1.8
  4. create a .vrt file with your ArcSDE connection and feature classe details
  5. add the vrt to QGIS, and voila!

Thing is, ogr takes a long time to connect. But viewing is OK. Just the connecting part is way too slow. Maybe someone will figure out a parameter for the connection to speed it up.

EDIT: forgot you also have to copy the following DLLs from your compilation in step 1: xerces-c_28.dll, spatiallite.dll and openjpeg.dll. You also need the ArcSDE libs: sde.dll, sg.dll, and pe.dll. Just put them in C:\OSGeo4W\bin.

EDIT 2: more info here: http://www.qgis.org/wiki/Connecting_to_ArcSDE_databases.

EDIT 3: the conection time is no longer a problem. Just a matter of correct connection string in the vrt. See the link for examples.

  • If you want SDE rasters, you want the gdal_sde.dll as well... – Howard Butler Sep 29 '11 at 14:44
  • In response to a complaint, I just removed the Tamas link, that went to a good resource when it was originally posted but now goes to a 404 page that advertises some objectionable content. Do you know of a current site for it? – Pops Mar 17 '15 at 16:30
2

If you use Postgres as your backend DB of ArcSDE, you have the option of storing spatial data in ST_Geometry (SDE spatial format) or PG_Geometry (PostGIS spatial format). If you store the data in PostGIS enabled DB and specify the PG_Geometry option when you import the data (optionally you can edit dbtune, I believe, to set PG_Geometry as the default), you will be able to connect to the data via an SDE connection or via a desktop client that can connect directly to PostGIS (such as QGIS)

-3

There is currently no way. If you were to use one of the Java based FOSS4G tools it should be possible using the SDE connector in geotools. I think this is how geoserver connects to SDE.

There is currently no data provider in the C++ world that plugs in to QGIS

  • Hey folks - before you downvote this more. Please look at the date when I answered this. – TheSteve0 Mar 20 '15 at 0:44
  • I suspect that this is getting downvoted because it is an answer that appears to be no longer valid. If it is no longer valid, then I would recommend deleting it. If it is still, or could be revised to once again become, current then that should help reverse the downvotes. – PolyGeo Sep 22 '15 at 5:03

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.