Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to consume data from a REST endpoint that returns features in geojson format within a model in ArcGIS 10.2. Is there a way to access a URL instead of opening a file?

If there is no way to access a URL directly, would this require a custom python script to access the URL and save it to a local file, or is there a better way?

share|improve this question

I ended up using a simple python script converted into a Tool:

import urllib2, arcpy

url = arcpy.GetParameterAsText(0)
path = arcpy.GetParameterAsText(1)

response = urllib2.urlopen(url)
localFile = open(path, 'w')

There may be a more elegant solution but this works for now. It would be easy enough to have the script convert the geojson to a featureset but with this generic download tool any data type can be retrieved in a model then converted as needed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.