• PostgreSQL 之 yum安装 postgis 插件


    版本说明:

    CentOS7.5 + PostgreSQL 10.5

    参考资源:

    https://www.postgresql.org/download/linux/redhat/

    http://download.osgeo.org/postgis/source/   postgis下载ftp网站

    https://trac.osgeo.org/geos/                          geos官方网站

    https://blog.csdn.net/xzwspy/article/details/80082082?utm_source=blogxgwz3     源码安装postgis,注意各个版本的兼容性

    https://www.cnblogs.com/ilifeilong/p/6979288.html                                                    源码安装postgis,注意各个版本的兼容性

    https://blog.csdn.net/learn_tech/article/details/80195566                                                 源码安装gdal

    http://2057.iteye.com/blog/1616620                                                                                  

    安装postgresql

    #Install the repository RPM
    yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
    
    #Install the client packages
    yum install postgresql10
    
    #Optionally install the server packages
    yum install postgresql10-server
    
    #Optionally initialize the database and enable automatic start
    /usr/pgsql-10/bin/postgresql-10-setup initdb
    systemctl enable postgresql-10
    systemctl start postgresql-10

    Platform support

    安装PostGIS

    1.先安装几个工具包

    yum install wget net-tools epel-release -y

    然后安装postgis

    yum install postgis24_10 postgis24_10-client -y

    安装拓展工具

    yum install ogr_fdw10 -y
    yum install pgrouting_10 -y

    2.创建数据库postgis

    CREATE DATABASE postgis OWNER postgres;

    切换新创建的database

    c postgis

    安装PostGis扩展

    postgis=# CREATE EXTENSION postgis;
    postgis=# CREATE EXTENSION postgis_topology;
    postgis=# CREATE EXTENSION ogr_fdw;

    然后可以验证是否安装成功

    SELECT postgis_full_version();

    另外,下面是官方网站点列的一份扩展:

    -- Enable PostGIS (includes raster)
    CREATE EXTENSION postgis;
    -- Enable Topology
    CREATE EXTENSION postgis_topology;
    -- Enable PostGIS Advanced 3D
    -- and other geoprocessing algorithms
    -- sfcgal not available with all distributions
    CREATE EXTENSION postgis_sfcgal;
    -- fuzzy matching needed for Tiger
    CREATE EXTENSION fuzzystrmatch;
    -- rule based standardizer
    CREATE EXTENSION address_standardizer;
    -- example rule data set
    CREATE EXTENSION address_standardizer_data_us;
    -- Enable US Tiger Geocoder
    CREATE EXTENSION postgis_tiger_geocoder;
    

      

  • 相关阅读:
    java enum类
    mvn filter autoconfig 产生自动配置
    Spring与Quartz的整合实现定时任务调度 以及crontab的用法
    网络广告术语CPC、CPM和CTR的含义和关系
    spring mvc3的注解@ResponseBody 自动返回jason
    Google Guava14.0 瓜娃学习笔记
    java中的各个数据结构区别
    org.apache.http.client.HttpClient; HttpClient 4.3超时设置
    maven test 运行 指定类或方法 打包 mvn clean assembly:assembly
    为什么要做url encode
  • 原文地址:https://www.cnblogs.com/EikiXu/p/9843904.html
Copyright © 2020-2023  润新知