PostGIS安装
sudo apt-get install PostGIS
sudo apt-get install postgresql-9.3-postgis-2.1
PostGIS使用
使用方式:
- 创建数据库
CREATE DATABASE example_gis;
- 连接数据库
\c example_gis;
- 设置成空间数据库
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION postgis_tiger_geocoder;
或者
psql -d yourdatabase -c "CREATE EXTENSION postgis;"
psql -d yourdatabase -c "CREATE EXTENSION postgis_topology;"
psql -d yourdatabase -c "CREATE EXTENSION postgis_tiger_geocoder;"

本文介绍了如何在Ubuntu系统上安装PostGIS,并提供了详细的步骤来创建空间数据库。此外,还展示了如何通过SQL命令来启用PostGIS扩展,包括postgis、postgis_topology及postgis_tiger_geocoder等。
1020

被折叠的 条评论
为什么被折叠?



