This repository contains the source code for the GDAL/OGR Plugin which is part of the AmigoCloud Mobile Data Collection Suite
The GDAL/OGR Plugin adds read support to any of the vector formats supported by GDAL/OGR.
Some popular formats include:
They are known to work on ArcGIS 10.1 SP1. For other versions you may have to compile the binaries yourself (they may work, although I have not tested them).
The current installer supports the following formats:
OGR Add data dialog
Spatialite and S57 files being read natively from ArcGIS
PostGIS (read FAQ below of why you may want to opt to do this as an alternative to ArcGIS Query Layers).
BSD License. For those of you not in Open Source geekdom, it means "hella free". You can pretty much, do whatever you want with it - Commercial or not. We ask that you please contribute any modifications back if you are kind enough to make modifications, but you are not forced to.
My spatialite is added to ArcMap as a standlone (i.e non-spatial table)
Make sure your sqlite files are spatialite files. For this, there needs to be some metadata tables. Don't add them manually though. Use the init_spatialite.sql file instead. Once you are done with this, the last thing to do is to make sure that the tables are registered with the geometry_columns table. If you are using the Spatialite GUI, this is as easy as right clicking on the geometry column and chooseing the Recover Geometry option. If you are doing it through the command prompt, you will find that the RecoverGeometryColumn is what you are looking for. Remember that ArcGIS only knows about FeatureClasses with specific geometry types (i.e POINT, MULTIPOINT, POLYGON, etc) and doesn't know how to interpret generic "GEOMETRY" declarations. In short, make sure that the entry in the geometry_columns specifies a specific geometry type if you want it to be added as a FeatureLayer in ArcMap.
Why would I connect with this to PostGIS if ArcGIS already supports PostGIS? Well, you don't have to, but there are some clear advantages. The GDAL PostGIS driver is updated quite often to take advantage of the new features of PostGIS. This way, you don't have to be stuck in a particular version of PostGIS to maintain ArcGIS compatibility.
This project uses the GDAL CSharp Bindings and of course GDAL, so you will need to get binaries for those. If you don't want to go through the trouble of compiling GDAL from scratch, you should try the GDAL SDK binaries compiled by Tamas Szekeres which I used to write the initial version of this Plugin. Remember that you need the 32 bit version because for some God-forsaken reason, ArcMap is still compiled for a 32-bit architecture even in 2012. At the time of this writing, I used release-1600-gdal-1-9-1-mapserver-6-0-3.zip. By the time you read this, a much newer version must exist.
My dll gets loaded but my breakpoints are not being hit. Help?
Ah yes, I ran into this problem, too. Turns out that if you compile against the 4.0.NET Runtime, you will need to make a slight change to the ArcMap.exe.config file that is shipped with ArcGIS. This little detail is described in their documentation. After changing the supportedRuntime section, your breakpoints will be hit.
Why is this implemented as a WorkspacePlugin? Doesn't it give you read support only?
I started writing everything on C++ implementing every single COM interface that the GeoDatabase uses so that I would fool ArcMap/ArcCatalog into thinking I was a full-blown GeoDatabase. I had it somewhat working, but there was always some interface that I had missed (and was not documented properly). After hearing directly from the source, that in the next ArcGIS release, WorkspacePlugin's will have write support, I thrashed the other project that was taking weeks to this which only took two days. I don't regret it a bit.
Does this run on ArcGIS Engine? Or Does it need Desktop?
Both the ICommands and the WorkspacePlugin code live in the same assembly, so ArcGIS Desktop is required (ArcView / Basic / or whatever the cheapest license is called now should work). There is nothing that is stopping you from separating the commands out and it should be very easy to do. I did not because I did not have an ArcGIS Engine license to test it so why do the work?
Why did you check-in the .csproj.user file you nimrod!?!? Don't you know you are supposed to leave those out?
Turns out that I am using Visual Studio Express 2010 to compile and debug this thing. I had to hand edit the proj and the user file to allow firing up ArcMap and have Release/Debug options in my IDE since those options are available on the Express editions of Visual Studio. It seems that is what the ArcGIS Visual Studio Templates also do.
Blob fields are not being read
This is a limitation with the current Swig bindings for OGR. It is being worked on. See the related ticket 4457
Workspace is readonly
In ArcGIS 10.1 SP1 (October 2012) ESRI will release a few interfaces that will allow write support to be easily implemented. Let's wait for them :)
Please fork this repository and contribute back using pull requests.
Any contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests are welcomed and appreciated but will be thoroughly reviewed and discussed. And of course it would make you cool. You want to be cool right?