Skip to content

Instantly share code, notes, and snippets.

View kes1's full-sized avatar

Andrew kes1

  • Geneva, Switzerland
View GitHub Profile
@kes1
kes1 / Coe.js
Created February 17, 2018 15:58
Google Spreadsheet get osm lat lon from node or way id
function getLatLong(osm_node) {
// Takes an open street map url and returns lat long as a comma separated string
// eg. osm_node = https://www.openstreetmap.org/way/95010444
// Returns 56.4563803,-3.069582
overpass_url = "http://overpass-api.de/api/interpreter?data=";
// TODO - handle this better;
var node_type = osm_node.split('/')[3]
var node_id = osm_node.split('/')[4]
@kes1
kes1 / Toolbox.pyt
Created June 29, 2015 20:32
ArcPy Python Toolbox - Update FieldMapping Parameters based on Feature Class Parameter Selector
import arcpy
class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of the
.pyt file)."""
self.label = "Toolbox"
self.alias = ""
# List of tool classes associated with this toolbox