Skip to content

Instantly share code, notes, and snippets.

Created October 12, 2012 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3880547 to your computer and use it in GitHub Desktop.
Save anonymous/3880547 to your computer and use it in GitHub Desktop.
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