Created
April 27, 2012 15:10
-
-
Save hampelm/2510030 to your computer and use it in GitHub Desktop.
PostGIS Recipes
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
echo "CREATE USER project_name WITH PASSWORD \'password\';" | psql postgres | |
createdb -O project_name project_name -T template_postgis | |
ogr2ogr -f PostgreSQL PG:dbname=databasename infile.shp | |
SELECT parcels FROM detroit where ST_Touches(current_parcel, detroit.geometry_column) | |
where current_parcel is a polygon geometry object in PostGIS | |
and detroit.geometry_column is the name of the column in the database with the polygon objects | |
and that will use the index | |
Copy the data from localhost to remote: | |
$ scp -r foo [email protected]:/some/remote/directory/bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment