This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Function: babysim_random_jobs_explode(geometry, integer) | |
-- DROP FUNCTION babysim_random_jobs_explode(geometry, integer); | |
CREATE OR REPLACE FUNCTION babysim_random_jobs_explode(the_geom geometry, maxiter integer DEFAULT 10000) | |
RETURNS geometry AS | |
$BODY$ | |
DECLARE | |
i INTEGER := 0; | |
x0 DOUBLE PRECISION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Function: public.polygon_clusters(character varying, character varying, character varying, numeric) | |
-- DROP FUNCTION public.polygon_clusters(character varying, character varying, character varying, numeric); | |
CREATE OR REPLACE FUNCTION public.polygon_clusters(parcels character varying, geom character varying, gid character varying, radius numeric) | |
RETURNS SETOF record AS | |
$BODY$ | |
DECLARE | |
lid_new integer; | |
dmn_number integer := 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Script for truncating and repopulating the geometry_columns table in a pre PostGIS 2.0 database. | |
#### This is important because the geometry_columns table often has legacy records where tables have been deleted | |
#### but the corresponding geom record was not removed. | |
## | |
## This could be done as a PostgreSQL function with a trigger as well. | |
## | |
## Author = Justin Lewis | |
## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Mike Tafel and Justin Lewis | |
## 2010/07/26 : updated Dec. 2012 | |
## | |
## Script that geocodes address data stored in a PostgreSQL (PostGIS) database using Google. | |
### Preps the db table, reads address data, builds a request url, returns lat/long/precision valuse to the same table, | |
### transforms coordinates to 4326 then 2232. | |
## | |
## Dependancies: | |
#### PostGIS database, Google Private Key and Client ID, all the libraries listed in the import below |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Author: Justin Lewis | |
#### This script can be used to export a single pg table to shapefile. | |
#### | |
#### Developed in a linux environment but should require minimal modification to run on other platforms. | |
#### | |
#### Dependancies: | |
###### fwtools (gdal > ogr2ogr), PostGIS database, Python, PyGreSQL | |
import os, _pg |
NewerOlder