1.前言廢話
KingbaseES(金倉(cāng)數(shù)據(jù)庫(kù)管理系統(tǒng))是人大金倉(cāng)公司經(jīng)過多年努力自主研發(fā)的、具有自主知識(shí)產(chǎn)權(quán)的商用關(guān)系型數(shù)據(jù)庫(kù)管理系統(tǒng)(DBMS)。該產(chǎn)品面向事務(wù)處理類應(yīng)用,兼顧各類數(shù)據(jù)分析類應(yīng)用,可用做管理信息系統(tǒng)、業(yè)務(wù)及生產(chǎn)系統(tǒng)、決策支持系統(tǒng)、多維數(shù)據(jù)分析、全文檢索、地理信息系統(tǒng)、圖片搜索等的承載數(shù)據(jù)庫(kù)。
GeoScene是地圖軟件。
2.環(huán)境介紹
2.1操作系統(tǒng)
發(fā)行版信息: CentOS Linux release 7.8.2003 (Core)
內(nèi)核: 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
2.2KingbaseES版本(自帶gis擴(kuò)展)
KingbaseES_V008R006C006B0021_Lin64_install.iso
2.3GeoScene版本
GeoScene 3.1
3.安裝過程
3.1KingbaseES安裝
# 創(chuàng)建kingbase用戶
useradd kdb
# 將安裝包拷貝至用戶目錄并修改為kingbase用戶所屬
cd /home/kdb
mount -o loop /home/kdb/KingbaseES_V008R006C006B0021_Lin64_install.iso /mnt
su - kdb
cd /mnt
./setup.sh

安裝kingbase過程

安裝kingbase過程2
選擇數(shù)據(jù)庫(kù)模式,此處為了適配geoscene選擇PG模式

選擇數(shù)據(jù)庫(kù)模式
剩余一路默認(rèn)安裝即可

完成kingbase安裝
3.2 postgis 擴(kuò)展的安裝
#在kingbase中使用ksql新建一個(gè)gisdata
ksql -U system -dtest -p54321
#創(chuàng)建空間數(shù)據(jù)庫(kù)
create database gisdata;
#登錄新創(chuàng)建的gisdata數(shù)據(jù)庫(kù)實(shí)例
ksql -U system -d gisdata -p 54321
#創(chuàng)建sde用戶和schema
create user sde superuser;
create schema sde;
alter schema sde owner to sde;
alter user sde password '********';
create user rds_superuser superuser;
#啟用空間數(shù)據(jù)庫(kù)插件
create extension postgis;

創(chuàng)建空間數(shù)據(jù)庫(kù)用戶與模式截圖
#修改pg_proc表的一個(gè)參數(shù)
alter system set allow_system_table_dml=on;
update pg_proc set proisstrict=false where proname ilike '%addgeo%' and proargtypes = '1043 1043 1043 1043 23 1043 23 16';
alter system set allow_system_table_dml=off;
select oid,proname,proargtypes,proisstrict from pg_proc where proname ilike '%addgeo%';

修改pg_proc參數(shù)
3.4 啟用地理數(shù)庫(kù)
1.在GeoScene Pro 3.1軟件中連接創(chuàng)建好的數(shù)據(jù)庫(kù)

GeoScene連接Kingbase
2.啟動(dòng)地理數(shù)據(jù)庫(kù)功能

運(yùn)行啟用地理數(shù)據(jù)庫(kù)工具
3.填寫工具參數(shù),運(yùn)行工具

工具參數(shù)填寫

啟動(dòng)企業(yè)級(jí)地理數(shù)據(jù)庫(kù)成功
4.安裝結(jié)果驗(yàn)證
4.1導(dǎo)入空間數(shù)據(jù)

導(dǎo)入空間數(shù)據(jù)并加載數(shù)據(jù)
4.2編輯空間數(shù)據(jù)

增加一個(gè)面狀多邊形
4.4 服務(wù)發(fā)布測(cè)試

將kingbase注冊(cè)到geoscene server

發(fā)布動(dòng)態(tài)地圖服務(wù)

在web端預(yù)覽發(fā)布的地圖服務(wù)