arcgis fulcrum add in

In researching the fulcrum API for potential use in a project I thought I’d push it a bit further and ended up building a tool to import fulcrum data into ArcGIS. This happens, sometimes for the good and sometimes for an exercise in clicking. This time for the good as I ultimately created a couple of useful things:

1. a c# wrapper that turns fulcrum apps and records into usable .net objects

2. an ArcGIS add-in that imports all records from a selected app into a new feature class

The wrapper turns fulcrum api json responses into c# dictionaries and lists via the JavaScriptSerializer class and creates instances of custom fulcrumrecord and fulcrumform objects. This went pretty smoothly because the fulcrum api is both documented and well thought out.

I then used this wrapper to build an ArcGIS (ArcMap) add-in that imports all records from a selected app into a new file geodatabase feature class and adds it as a layer to the current map document. This is implemented via a separate class that digs into the depths of the ArcObjects model to create the feature class and populate it. If you’re familiar with ArcObjects this should look pretty familiar, if you are not, you might want to shield your eyes.

The code is available on github and you can find it here:

https://github.com/brightrain/arcgis-fulcrum-add-in

You can also just grab the .esriAddIn file from here and install it:

https://www.dropbox.com/s/83few0hg7lj4h4t/fulcrum.esriAddIn

(BSD licensedisclaimer applies, truly alpha at this point)

Use is pretty straight forward, first you need to get your fulcrum api key from your profile, http://web.fulcrumapp.com/users/api then sign in. Then you’ll want to either create a new file geodatabase or determine which one you’d like to use. Both of these go in the Settings (gears on fulcrum add-in toolbar)

Notes:

The import is a read-only snapshot of the current records in the selected app. This can obviously be extended any way you like but, as-is, the feature class created is static.

Initially I added a setting to define the folder where photos were to be located and  the (first) photo for each record was downloaded to that location. The feature class then contained the full file path to the photo. I quickly realized that this could take a very long time depending on how many recordsphotos there are. So I altered it to populate a field with the link to the photo on the fulcrum site. However, there is also a branch of the git source that contains the original functionality to define a location and download the photo to disk.

Currently only the first photo is linked todownloaded. This could be handled by creating a separate, related stand alone table to hold links to multiple photos linked via the record id.

Recursion needs to be implemented in a couple of places to fully support the fulcrum data model. Most notably in the Section element type; the application currently ignores sections. But there can be an infinite number of nested sections that contain child elements.

It’s worth a mention that, if you’re looking for a COTS solution, Arc2EarthSync (beta)  now includes fulcrum as a provider that acts to keep fulcrum data up to date. I understand there are also plans to make it bi-directional.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>