-
Notifications
You must be signed in to change notification settings - Fork 2
Postgis
damien-hackadl edited this page Jun 1, 2013
·
4 revisions
$ sudo aptitude install postgresql-9.1-postgis
$ sudo psql -h localhost
onion=# create database onion
onion=# \q
$ sudo -u postgres createuser damien
Importing the Gazetteer
shp2pgsql -W LATIN1 -c Gazetteer.shp | psql onion > /dev/null
There was a non-UTF-8 character, which needed the -W LATIN1
.
select name from gazetteer where the_geom && ST_MakeEnvelope(137.7, -34.2, 137.8, -34.5, -1);
-1 is the spatial reference system. We're not anal enough to care about one.