日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

链接oracle spatial,oracle spatial初试

發布時間:2025/3/20 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 链接oracle spatial,oracle spatial初试 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

一、下載shp2sdo 工具,將工具放在 oracle按照目錄下的bin目錄下

oracle的bin目錄一般為:D:\app\***\product\11.2.0\dbhome_2\BIN

或者:在開始菜單中的oracle-OraDb11g_home1 >配置和移植工具>Database Configuration Assistance 右鍵屬性,打開文件位置 即可看到BIN目錄

二、

(1)cmd 到 shp文件目錄下,運行命令

D:\oraclespatial\shp2sdo\shp>shp2sdo.exe

shp2sdo - Shapefile(r) To Oracle Spatial Converter

Version 2.15 21-May-2004

Copyright 1997,2004 Oracle Corporation

For use with Oracle Spatial.

(2)輸入shp文件名,會生成sql,ctl,dat文件:

Input shapefile (no extension): wzs

Shape file wzs.shp contains 1 polygons

Output table [wzs]:

Output data model [O]:

Geometry column [GEOM]:

ID column []:

Use a spatial reference system ID (SRID) ? [N]:

Change tolerance value from the default (0.00000005) ? [N]:

Generate data inside control files ? [N]:

Target database Oracle8i? [N]:

Spatial Data requires more than 6 digits precision? [N]:

Bounds: X=[322971.488900,365999.591200] Y=[2061134.731500,2106240.455700]

Override ? [N]:

Processing shapefile wzs into spatial table WZS

Data model is object-relational

Geometry column is GEOM

Points stored in SDO_POINT attributes

Data is in a separate file(s)

Control file generation for Oracle9i or higher

Spatial data loaded with 6 digits of precision

Conversion complete : 1 polygons processed

The following files have been created:

wzs.sql : ? ? SQL script to create the table

wzs.ctl : ? ? Control file for loading the table

wzs.dat : ? ? Data file

(3)登錄數據庫

D:\oraclespatial\shp2sdo\shp>sqlplus XX/**@SID

SQL*Plus: Release 11.2.0.1.0 Production on Tue Apr 30 09:21:19 2019

Copyright (c) 1982, 2010, Oracle. ?All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Productio

With the Partitioning, OLAP, Data Mining and Real Application Testing optio

(4)讀取sql文件

SQL> @wzs.sql

DROP TABLE WZS

*

ERROR at line 1:

ORA-00942: table or view does not exist

Table created.

1 row deleted.

1 row created.

Commit complete.

(5)完成后退出

SQL>exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0

bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing optio

(6)上載數據:

D:\oraclespatial\shp2sdo\shp>sqlldr xx/**@sid

SQL*Loader: Release 11.2.0.1.0 - Production on 星期二 4月 30 09:22:36 2019

Copyright (c) 1982, 2009, Oracle and/or its affiliates. ?All rights reserve

達到提交點 - 邏輯記錄計數 1

(7)創建索引:

SQL> create index IDX_WZS on wzs(geom) indextype is mdsys.spatial_index;

Index created.

總結

以上是生活随笔為你收集整理的链接oracle spatial,oracle spatial初试的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。