PostgreSQL扩展PostGIS

首先,确保已经安装了与PostgreSQL版相匹配的PostGIS.
(PostGIS下载地址 http://download.osgeo.org/postgis/windows/)

在想要扩展的数据库下,执行下面语句

create extension postgis; -- PostGIS的矢量数据扩展
create extension postgis_raster; -- PostGIS的栅格数据扩展

验证是否扩展成功,执行下面语句不报错即可

select ST_SetSRID(ST_Point(-108,30.741),4326),ST_GeomFromText('POINT(-106.51 29.741)',4326)
posted @ 2021-03-24 15:29  lqqgis  阅读(449)  评论(0编辑  收藏  举报