Batch Geocoding in Web App Builder?

7286
10
Jump to solution
12-30-2014 11:21 AM
LangdonSanders2
Occasional Contributor

Hello,

I am looking for resources on how to implement a batch geocoding widget in the Web App Builder.  The current geocoder only takes one line input for addresses.

We have ArcGIS server hosting REST address locators.  These locators can be used in ArcMap to batch geocode a table of addresses without a problem.

Ideally, we would like users of our web application made via the Web App Builder to upload a csv table of addresses as an input which would then be geocoded and displayed on the web app map.  We would like to use our own geocode service and not the ArcGIS online service.  My best guess would be to publish a geoprocesssing service of a successful geocode, then use this in the geoprocessing widget in the Web App Builder.

Will I need to write a custom widget using the JS API Locator and request?

Has anybody been successful in batch geocoding in the Web App Builder?  I have seen examples of Flex widgets and our previous .net application had this functionality.

Any help would be appreciated.  Thank you.

Langdon

Reply
0 Kudos
1 Solution

Accepted Solutions
ColeAndrews
Occasional Contributor III

Langdon-- appreciate all your insight. I haven't started working towards a solution for our org yet, but those are great suggestions.

I did, however, just notice this particular item listed as a few feature of WAB:  "The GP widget has support for uploading data to use in geoprocessing services that have upload capability." This should allow us to create a geocode model, publish as a geoprocessing server, and have the user point to an upload file on their local drives. Haven't tested it yet...would this solve your issue?

View solution in original post

10 Replies
BradNiemand
Esri Regular Contributor

Langdon,

I would look at the "Generate" REST API.

ArcGIS REST API

There is nothing built into the JS API for doing batch geocoding out of the box though.

Brad

LangdonSanders2
Occasional Contributor

Thank you Brad.

This is something I have to set down for a couple weeks, but look forward to looking at the reference you provided.  Here are the options I've come to so far.

  1. I had hoped to use the Geoprocessing widget to run a GP task on a user supplied file.  So far I have found that the GP Widget in the Web App Builder cannot take a user file upload.  However, it can process a file if the input is a string filepath - so long as this filepath points to a document already located on the server.  i.e. "C:\arcgis\input\example.csv" points to the server C: drive rather than a user drive.  This does not solve the problem.
  2. My next option would be to make a custom widget.  This requires taking the Web App Builder off AGOL to our local servers so this is not a great solution, requiring additional maintenance.
  3. Third we could use AGOL web maps to batch geocode with drag/drop tables after setting the default geocode service to our own service in the organizational settings.  This would work well except that it requires named users for our AGOL organization.  A similar option may be to use Google's open apps such as My Maps & Fusion tables thereby bypassing the user restrictions.  This would not use our own geocode service.
  4. The final option is to build a focused app using the JS API with the sole purpose of geocoding and displaying points.

Here are a few helpful resources:

    1. Kevin Hibmaauthored the helpful video Creating and Working with Geoprocessing Services | Esri Video
      1. Includes example demo with upload file.
      2. Additionally this thread looks promising Upload File to ArcGIS Server
    2. Customizing and Extending Web AppBuilder for ArcGIS | Esri Video

    

My magic genie wish would be to have the Esri Web App Builder official release include a new widget specifically for the batch geocode task as batch geocoding is a common request across the GIS field.

ColeAndrews
Occasional Contributor III

Langdon-- have you implemented any of these workarounds? Perhaps the geoprocessing widget now allows the user to supply input files?

Reply
0 Kudos
LangdonSanders2
Occasional Contributor

Hello Cole,

We decided to deploy ArcGIS Online user accounts instead of the other options at this time. The ArcGIS Online users can create web maps and drag/drop or add csv address files to the map. You can also set this to use your own geocoder so it does not use any credits. This also provide the ability for them save their maps, share, and edit the points. Overall there are a lot of nice features (as I am sure you are aware).

However, the BIG caveat is it bottle-necked by the number of named users of your organization. We have nominated a few individuals from each department to have this access, while others will simply consume the maps created.

Back to the original topic: I did find a couple solutions. One solution which is a simple html web page you can host which supports drag / drop of csv using javascript. It sends your csv to the server and plots markers on the map using Leaflet.js I am a big fan of Leaflet and would personally like to deploy this option, however, due to requiring some knowledge of HTML, the ArcGIS Online option is a safer bet for our initial roll-out. Leaflet is extendable to add other capabilities but excels at providing a simple map for embedding in web sites. I'll look at work tomorrow to find the link and example.

I did attempt the geoprocessing widget / service but there were issues with it accepting a file upload in the Web App Builder environment - there may still be an solution here but I invested a bit of time without success.

The good news is esri knows about this request and it may be in the works.They just added a geolookup widget which takes a CSV input in the Web App Builder. This requires a lat long coordinate and does not run through your own geocoder - so hopefully sometime soon they will post a new or adjusted widget.

Thanks for your interest. Let us know if you find something else.

ColeAndrews
Occasional Contributor III

Langdon-- appreciate all your insight. I haven't started working towards a solution for our org yet, but those are great suggestions.

I did, however, just notice this particular item listed as a few feature of WAB:  "The GP widget has support for uploading data to use in geoprocessing services that have upload capability." This should allow us to create a geocode model, publish as a geoprocessing server, and have the user point to an upload file on their local drives. Haven't tested it yet...would this solve your issue?

View solution in original post

LangdonSanders2
Occasional Contributor

Hello Cole,

This is great news. Thanks for the posting the update. I will have to look into it which may solve these issues - at least in the locally deployed developer edition.

Reply
0 Kudos
LangdonSanders2
Occasional Contributor

Cole,

THANK YOU!

Yes it appears that this will accept file upload. Here is the example I used to set up the GP service for this widget: http://www.arcgis.com/home/item.html?id=97e918061ad140dcbab68a38782b408b
You can download materials here: http://www.arcgis.com/sharing/content/items/4fd83694cfde463c817a6eabff24bcff/data

Configure this to whatever geoprocess function  you wish after the file is uploaded. I will post more details next week.

uploadgpwidget_setup.png

Running the tool:

uploadgpwidget.png

http://www.arcgis.com/home/item.html?id=97e918061ad140dcbab68a38782b408b

ColeAndrews
Occasional Contributor III

Langdon-- I'm working on something very similar right now. Are you using WAB dev 1.3 paired with Portal or AGOL? WAB dev isn't accepting any of our GP services, but if we use WAB built in to Portal it works just fine. Trying to troubleshoot...did you have any issues?

Reply
0 Kudos
LangdonSanders2
Occasional Contributor

Hello Cole,

I have not been able to work on this in some time. Previously we were using the AGOL version of WAB without issues (it recognized the GP services and inputs). I recently changed jobs and will primarily be using the dev version for Portal so I will have to investigate this further and let you know if I encounter anything similar.

Do you have additional details?

I can't speak to anything beyond WAB and GP Service configuration as networks and firewall settings are outside my wheelhouse - which I am guessing may be an issue if it works on a local Portal but not through AGOL.

Langdon

Reply
0 Kudos