Postgresql 空间扩展需要Postgis插件
下载Postgis http://postgis.net/ Windows: http://download.osgeo.org/postgis/windows/ Linux/Redhat/Centos: https://yum.postgresql.org/ Postgresql扩展Postgis Windows: SQL Shell进入需要扩展Postgis的数据库。 hngsmm=# CREATE EXTENSION postgis; Linux : yum install postgis2_94 # 因为安装的PostgreSQL版本为9.4,所以是postgis2_94 注: 需要PostgreSQL9.1以上版本才支持PostGIS. PostGIS中的常用函数 ......好几页省略..... 首先需要说明一下,这里许多函数是以ST_[X]yyy形式命名的,事实上很多函数也可以通过xyyy的形式访问,在PostGIS的函数库中我们可以看到这两种函数定义完全一样。 1. OGC标准函数 管理函数: 添加几何字段 AddGeometryColumn (, , , , , ) 删除几何字段 DropGeometryColumn (, , ) 检查数据库几何字段并在 geometry_columns 中归档 Probe_Geometry_Columns ()