Skip to content

Instantly share code, notes, and snippets.

View rajanski's full-sized avatar

rajanski

View GitHub Profile
@rajanski
rajanski / README.md
Last active August 29, 2015 14:24 — forked from tmcw/README.md
@rajanski
rajanski / gist:ccf65d4f5106c2cdc70e
Last active October 24, 2021 04:11 — forked from aflaxman/gist:287370
OSM to networkx graph with node coordinates ;-)
"""
Read graphs in Open Street Maps osm format
Based on osm.py from brianw's osmgeocode
http://github.com/brianw/osmgeocode, which is based on osm.py from
comes from Graphserver:
http://github.com/bmander/graphserver/tree/master and is copyright (c)
2007, Brandon Martin-Anderson under the BSD License
"""
import xml.sax
CREATE OR REPLACE FUNCTION voronoi(table_name text,geom_col text) returns SETOF record as $$
#############################################################################
#
# Voronoi diagram calculator/ Delaunay triangulator
# Translated to Python by Bill Simons
# September, 2005
#
# Additional changes by Carson Farmer added November 2010
#