CentOS7上为PostgreSQL11安装PostGIS
2020-10-16 08:44 abce 阅读(750) 评论(0) 编辑 收藏 举报安装环境:Cenots 7.5 + PostgreSQL11.9
GIS (Geographic Information Systems) 支持基于R-tree的GiST索引。分析和处理GIS对象。
1.增加EPEL资料库
1 | yum -y install epel-release |
2.安装PostGIS
1 2 | yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm yum install postgis30_11 |
3.安装后检查
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # rpm -qi postgis30_11 Name : postgis30_11 Version : 3.0.2 Release : 2.rhel7 Architecture: x86_64 Install Date : Thu 15 Oct 2020 09:09:30 AM CST Group : Unspecified Size : 34467716 License : GPLv2+ Signature : DSA/SHA1, Tue 29 Sep 2020 08:15:51 PM CST, Key ID 1f16d2e1442df0f8 Source RPM : postgis30_11-3.0.2-2.rhel7.src.rpm Build Date : Tue 29 Sep 2020 08:15:47 PM CST Build Host : koji-centos7-x86-64-pgbuild Relocations : ( not relocatable) Vendor : PostgreSQL Global Development Group URL : http://www.postgis.net/ Summary : Geographic Information Systems Extensions to PostgreSQL Description : PostGIS adds support for geographic objects to the PostgreSQL object-relational database . In effect, PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a backend spatial database for geographic information systems (GIS), much like ESRI 's SDE or Oracle' s Spatial extension. PostGIS follows the OpenGIS "Simple Features Specification for SQL" and has been certified as compliant with the "Types and Functions" profile. |
4.登录数据库,创建postgis扩展
1 | create extension postgis; |
5.登录数据库后查看
1 2 3 4 5 6 7 8 9 10 11 12 | # select * from pg_available_extensions where name ~ 'gis' ; name | default_version | installed_version | comment ------------------------+-----------------+-------------------+--------------------------------------------------------------------- btree_gist | 1.5 | | support for indexing common datatypes in GiST postgis | 3.0.2 | 3.0.2 | PostGIS geometry, geography, and raster spatial types and functions postgis_raster | 3.0.2 | | PostGIS raster types and functions postgis_tiger_geocoder | 3.0.2 | | PostGIS tiger geocoder and reverse geocoder postgis_sfcgal | 3.0.2 | | PostGIS SFCGAL functions postgis_topology | 3.0.2 | | PostGIS topology spatial types and functions (6 rows ) # |
1 2 3 4 5 | # select postgis_full_version(); postgis_full_version ------------------------------------------------------------------------------------------------------------------------------------------------------------------ POSTGIS= "3.0.2 2fb2a18" [EXTENSION] PGSQL= "110" GEOS= "3.8.1-CAPI-1.13.3" PROJ= "7.1.1" LIBXML= "2.9.1" LIBJSON= "0.11" LIBPROTOBUF= "1.0.2" WAGYU= "0.4.3 (Internal)" (1 row) |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)