Oracle空间数据至GBase
Oracle空间数据至GBase
1、GIS数据类型的对比:
| oracle | postgresql | GBase |
|---|---|---|
| SDO_GEOMETRY | geometry | geometry |
| ST_GEOMETRY | geometry | geometry |
2、GIS空间数据处理
2.1 GIS数据合并操作后,数据校验
在数据库中插入两个面:

2.2. oracle 结果如下

enter code hereenter description here
将面数据进行合并;

2.3 导出空间数据为shp格式

enter description here
2.4 将数据导出成shp文件后,导入GBase。
Non-SSL connection (SSL connection is recommended when requiring high-security)
You are now connected to database "sde" as user "gbase".
sde=# create table gis_test (id int,geom geometry);
CREATE TABLE
sde=# \q
[gbase@gbase8c_5_103 gis_test]$ shp2pgsql -s 3857 -a -W GBK gsi_test.shp gis_test | gsql -d sde -p 15400
Shapefile type: PolygonZ
Postgis type: MULTIPOLYGON[4]
SET
SET
BEGIN
INSERT 0 1
COMMIT
ANALYZE
[gbase@gbase8c_5_103 gis_test]$
enter description here
地图预览:
3、两库之间数据比对
- 1 oracle中包含至少15列用来存储空间数据,而在Postsgres和GBase8c中仅存在一列。直接迁移或同步问题较多。
- 参考常用GIS函数

浙公网安备 33010602011771号