Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Refine Extract for GeoLocate georeferencing
To make a call to GeoLocate using Country, State, County, Locality:
"http://www.museum.tulane.edu/webservices/geolocatesvcv2/glcwrap.aspx?Country="+escape(cells["Country"].value,"url")+"&Locality="+escape(cells["Locality Name"].value,"url")+"&state="+escape(cells["State"].value,"url")+"&county="+escape(cells["County"].value,"url")
To get the decimalLongitude from the GeoLocate response:
value.parseJson(" { 'a' : 1 } ").get("resultSet").get("features")[0].get("geometry").get("coordinates")[0]
To get the decimalLatitude from the GeoLocate response:
value.parseJson(" { 'a' : 1 } ").get("resultSet").get("features")[0].get("geometry").get("coordinates")[1]
To get the coordinateUncertaintyInMeters from the GeoLocate response:
value.parseJson(" { 'a' : 1 } ").get("resultSet").get("features")[0].get("properties").get("uncertaintyRadiusMeters")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment