Shapfile 导入 Oracle

使用shp2sdo将shapfile导入到oracle数据库:
========
打开--》运行--》CMD;定位到shapfile在电脑中的存储位置 D:\map\CANADA
=======
输入 shp2sdo.exe shapfile的文件名 数据库表名 -i gid -g geom  -s 8307 -d -x (-180,180) -y (-90,90)
========
打开数据库连接
sqlplus testspatial/test2011@orclsde
=========
SQL>@数据库表名.sql
SQL>exit
==============
输入:sqlldr testspatial/test2011@orclsde
control = 数据库表名.ctl

==============

如果为Polygon类型的shapfile在导入Oracle时,一定要记得升级,在这里我倒腾了好几天,具体步骤如下:

SQL> execute sdo_migrate.to_current('数据库表名称','几何字段名')

=================
成功导入
================
testspatial/test2011@orclsde对应于客户端:
用户名:testspatial
密码:test2011
服务号:orclsde

posted @ 2011-08-17 13:02  一路遥遥  阅读(240)  评论(0编辑  收藏  举报