Skip to content

Instantly share code, notes, and snippets.

@darrell
darrell / voronoi.sql
Last active November 22, 2020 03:03
Code to generate Voronoi diagrams in PostGIS using Python. Many thanks to everyone who contributed to this code. Original blog post describing the work is here: http://geogeek.garnix.org/2012/04/faster-voronoi-diagrams-in-postgis.html
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
#
./index.js export --minzoom=0 --maxzoom=19 --bbox=-77.25,38.73,-76.77,39.05 running_map rrrr2.mbtiles