Skip to content

Instantly share code, notes, and snippets.

View gEYEzer's full-sized avatar

gEYEzer gEYEzer

  • Small Town GIS
  • Northern Utah, USA
View GitHub Profile
@gEYEzer
gEYEzer / AGO_PullHostedFeatures.py
Last active March 31, 2016 16:10 — forked from oevans/AGO_PullHostedFeatures.py
My modification to oevans' Python script to pull hosted features with attachments into a local file geodatabase. See ReadMe below.
import os, urllib, urllib2, datetime, arcpy, json
## ============================================================================== ##
## function to update a field - basically converts longs to dates for date fields ##
## since json has dates as a long (milliseconds since unix epoch) and geodb wants ##
## a proper date, not a long.
## ============================================================================== ##
def updateValue(row,field_to_update,value):
outputfield=next((f for f in fields if f.name ==field_to_update),None) #find the output field