postgis的安装

postgis-0.9,postgresql-8.0.0beta4,geos 2.0.1

1. install geos 2.0.1
LDFLAGS=-lstdc++ ./configure
make
make install
2. modify ld.so.conf
nano /etc/ld.so.conf
# add /usr/local/lib
/sbin/ldconfig
3. install postgresql
./configure
make
make install
# and run with computer start
4. install postgis
# modify Makefile.config
# change proj and geos directory
rm -f -r /where/postgresql_source/contrib/
cp -R postgis /where/postgresql_source/contrib/
cd /where/contrib/postgis
make
make install
5. init postgis
su postgres
createdb heihe
createlang plpgsql heihe
psql -d heihe -f lwpostgis.sql
psql -d heihe -f spatial_ref_sys.sql
6. dump your data to heihe db
shp2pgsql river river heihe > river.sql
psql -d heihe -f river.sql

This entry was posted in GIS and tagged , , , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string rfQpyU to the field below:

以新浪微博帐号登录