Shape file 导入到Oracle Spatial 数据库

本文介绍了如何将ESRI的Shapefile导入到Oracle Spatial数据库中,包括使用shp2sdo.exe工具的详细步骤,涉及解压、配置、执行命令及创建空间索引。此外,还分享了在已有表中插入记录的方法,通过修改ctl文件和构造SQL语句实现数据迁移。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近项目涉及该内容,但是网上搜索的很多oracle的相关链接都是以前的url,现在无法访问。

虽然shp2sdo.exe在优快云上也有下载,但总归是需要积分的,另外,在找资源时,又发现了以下相关内容,也在此汇总,以便有需要或有兴趣的看官一用。


ps1:  JAVA SHAPEFILE CONVERTER,也是用于将esri的shp文件转换为oracle的数据库表的工具,原文介绍如下:

DESCRIPTION
The Java Shapefile Converter transforms an ESRI Shapefile into an Oracle database table
for use with Oracle Spatial and Locator. The Shapefile Converter uses the Oracle Spatial
Java-based Shapefile Adapter and SampleShapefileToJGeomFeature classes to load a
Shapefile directly into a database table, with the Oracle-equivalent .dbf data types for the
attribute columns and the SDO_GEOMETRY data type for the geometry column. The
Shapefile Adapter can also be used to create your own applications and interfaces that
transform Shapefiles to SDO_GEOMETRY or JGeometry data types (see the Oracle
Spatial Java API for more information). To simply load a Shapefile into the database, use
the SampleShapefileToJGeomFeature class as illustrated below.
文档传送门>>
文中涉及的;%ORACLE_HOME%\md\jlib\sdoutl.jar;%ORACLE_HOME%\md\jlib\sdoapi.jar  是安装什么版本的oracle附带的lib,烦请有知道的看官留言,在此不胜感激!

ps2:Oracle Spatial 空间信息管理  这本书貌似讲的很详细,优快云有下载,上下两部分需要10分,但也有部分章节试读的;

试读传送门>>


回归正题,shp2sdo.exe 目前下载方法如下:

1、进入Oracle的搜索页面:https://search.oracle.com/search/

2、搜索shp2sdo,下面列出结果:


第一个using-shp2sdo是使用说明,内容如下:

Example usage of the shape to sdo converter for Oracle9i Spatial and higher versions -

on Windows NT:

shp2sdo.exe states states -g geom -d -x (-180,180) -y (-90,90) -s 8307 -t 0.5 -v

on Sun Sparc Solaris or Linux:

shp2sdo.exe states states -g geom -d -x \(-180,180\) -y \(-90,90\) -s 8307 -t 0.5 -v

In the previous command
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值