Oracle Spatial中上载GIS空间数据方法研究

合集下载

基于Oracle Spatial的GIS空间数据处理及应用系统开发

基于Oracle Spatial的GIS空间数据处理及应用系统开发

基于Oracle Spatial的GIS空间数据处理及应用系统开发潘农菲
【期刊名称】《计算机工程》
【年(卷),期】2002(028)002
【摘要】从介绍地理信息系统(GIS)中属性数据和空间数据的传统的存储方式,以及这种存储方式给分布式应用系统开发带来的诸多问题开始,对Oracle Spatial技术进行了分析,详细阐述了这种先进的解决方案和如何实现属性数据和空间数据一体化存储的理论细节.进而提出了基于该项技术的应用系统的开发方法.
【总页数】3页(P278-280)
【作者】潘农菲
【作者单位】西南交通大学通讯与工程学院,成都,610031
【正文语种】中文
【中图分类】TP311.13
【相关文献】
1.GIS中基于Oracle Spatial存储空间数据的研究 [J], 雍壮志;洪应宋;刘连旺
2.Linux环境下基于Oracle Spatial的分布式海量空间数据处理平台的设计与实现[J], 冯杭建;刘南;刘仁义
3.基于ArcGIS和Oracle Spatial的城市空间基础数据库系统 [J], 向红梅
4.基于Oracle Spatial空间数据库的GIS数据管理 [J], 姚力波;王仁礼
5.基于VC++,MapInfo和Oracle Spatial的GIS应用系统开发 [J], 魏金占;周晓光;周家香;刘军生
因版权原因,仅展示原文概要,查看原文内容请购买。

MAPGIS数据向Oracle Spatial空间数据的转换

MAPGIS数据向Oracle Spatial空间数据的转换

MAPGIS数据向Oracle Spatial空间数据的转换
董钧祥;宋丽
【期刊名称】《长江科学院院报》
【年(卷),期】2006(023)002
【摘要】基于Oracle Spatial的空间数据管理方式逐渐被大多数GIS软件所认同,但还没有出现提供MAPGIS格式的数据向Oracle Spatial空间数据格式转换的第三方工具.针对这一问题,分析了MAPGIS数据和Oracle Spatial数据库各自的结构特征,在此基础上实现了MAPGIS数据向Oracle Spatial空间数据的转换.
【总页数】3页(P25-27)
【作者】董钧祥;宋丽
【作者单位】云南国土资源职业学院,昆明,6502172;长江科学院,空间信息技术应用研究所,武汉,430010
【正文语种】中文
【中图分类】TP311.52
【相关文献】
1.MAPGIS与Oracle数据库空间数据格式的转换 [J], 郝翠萍
2.实现ArcSDE向Oracle9i Spatial空间数据的转换 [J], 傅俊;刘南;刘仁义
3.ORACLE 8i Spatial空间数据仓库空间数据特性简析 [J], 程彬
4.基于Oracle Spatial空间数据库数据的动态读取 [J], 汪斌
5.ARCSDE与Oracle9i Spatial空间数据转换方法研究 [J], 谭坤龙;丁文源;傅炳荣
因版权原因,仅展示原文概要,查看原文内容请购买。

基于Oracle Spatial的空间数据管理与研究

基于Oracle Spatial的空间数据管理与研究

基于Oracle Spatial的空间数据管理与研究摘要:目前,人类活动所涉及到的信息80% 以上是与空间数据有关。

随着“数字地球”“数字城市”建设的大力进行,空间观测技术的不断发展,空间数据正呈几何级数增长。

如何高效、快速地组织、存储和管理海量空间数据,满足国内数字化生产和国家基础地理信息产业建设的迫切需要,实现海量空间数据的存储与管理,是地理信息系统(GIS)亟待解决的主要问题之一。

本文主要采用Oracle Spatial技术来解决这一主要问题。

关键词:空间数据;Oracle Spatial ;空间数据管理;元数据Abstract: at present, human activities involved more than 80% of the information and the spatial data is about. With “digital earth” “digital city construction vigorously, space observations of the development of technology, spatial data are of geometric growth. How to efficient and fast organization, storage and management massive spatial data, satisfy the production and the national digital fundamental geographic information industry of construction urgent need to achieve massive spatial data storage and management, is the geographical information system (GIS) one of the major problems to be solved. This paper is Oracle Spatial technology to solve the main problem.Keywords: spatial data; Oracle Spatial; The spatial data management; Yuan data1 引言1998年1月,美国副总统戈尔在《数字地球—认识21世纪我们这颗星球》的报告中首次提出了数字地球的概念,掀起了继1992年信息高速公路之后的人类又一大壮举,即建设“数字地球”的空间信息革命[1]。

基于OracleSpatial的地质空间数据管理系统的研究与实现_李丰丹

基于OracleSpatial的地质空间数据管理系统的研究与实现_李丰丹

图1基于空间数据库的空间数据存储模型
1.3空间数据索引机制
空间索引是缩短搜索路径的方法,索
引数据是由基于几何体的空间数据生成
的,是一种逻辑性索引。

其作用包括:窗
口查询,在索引过的数据空间中找到与给
定点或区域有相互作用的对象;空间连
结,在2个索引过的数据空间中,找到空
间相互作用的对象对。

在Oracle Spatial中,
有2种空间索引方式:R-TREE索引和
QUADTREE索引。

对空间数据的索引可
基金项目:国家高技术研究发展计划863资助项目(2002AA134010)
作者简介:李丰丹(1980),女,山西人,中国地质大学(武汉)信息工程学院硕士研究生,研究方向为地理信息系统及其应用。

Oracle Spatial空间数据在ArcSDE中的图层注册

Oracle Spatial空间数据在ArcSDE中的图层注册


要: 将 O r a c l e S p a t i a l 空间数据注册成为 A r c S DE 图层,是在 O r a c l e数据库 中完成 O r a c l e S p a t i a l 空间数据 向
ቤተ መጻሕፍቲ ባይዱ
A r c G I S 格式转换, 实现 O r a c l e S p a t i a l 空间数据与其它格式空间数据互操作 的可行方法. 分析 了采用 A r c S D E A P I 和
2 0 1 5年 第 2 4卷 第 1期
h t t p : / / w ww . c - S - a . o r g . c n
计 算 机 系 统 应 用
Or a c l e S p a i t a l 空 间数据在 Ar e S D E 中的图层注
李 家 ,曹 威
( 辽 宁师 范大学 城市与环境学院,大连 1 1 6 0 2 9 )
O r a c l e S p a t i a l 是O ra c l e公司推出的空间数据库组
前 者的易用 性不高 ,需要每 台客户端都 安装 Ar c S D E A P I环境.后者 执行 时有一定 的延迟,在批量注册 图
件,很多空间数据 管理系统( 如C AR I S H P D 海道产品 数据库1 就 是基于 O r a c l e S p a t i a l 开发 【 1 — 1 .在实际工作 中为实现 Or a c l e S p a t i a l空间数据 与异构空间数据( 如 A r c G I S 、Ma p l n f o 、A u t o C A D 等 的互操作 ,比较可行 的方法是将 O r a c l e S p a t i a l 空间数据在 O r a c l e 数据库 中

一种基于OracleSpatial的WebGIS实现方法

一种基于OracleSpatial的WebGIS实现方法

一种基于OracleSpatial的WebGIS实现方法
朱志伟;刘书雷;李军
【期刊名称】《计算机工程》
【年(卷),期】2004(030)002
【摘要】分析了在WebGIS平台MapXtreme的条件下,利用空间数据库管理系统OracleSpatial管理GIS数据可能遇到的问题,并提出了解决的方法.描述了基于MapXtreme的WebGIS的4层体系结构,并分析了在这种结构下网站的扩展性策略等关键技术,最后简要介绍了一个基于OracleSpatial的运行实例.
【总页数】3页(P98-99,167)
【作者】朱志伟;刘书雷;李军
【作者单位】国防科技大学政治部,长沙,410073;国防科技大学政治部,长
沙,410073;国防科技大学政治部,长沙,410073
【正文语种】中文
【中图分类】P208
【相关文献】
1.一种基于ActiveX和Web Service的电力系统WebGIS的设计与实现 [J], 江啸;史浩山;陈丁剑
2.一种利用位图实现类WebGIS的方法 [J], 李幼平;杨建红
3.一种基于WebGIS的水质监测数据表达方式的设计与实现 [J], 李成军;刘爱园
4.一种基于与ActiveX的安全的WebGIS实现方案 [J], 韩双旺;李芙蓉;崔兆顺;周珑;李德录
5.一种基于服务器场的分布式WebGIS计算模型设计与实现 [J], 郭明强;黄颖;谢忠
因版权原因,仅展示原文概要,查看原文内容请购买。

基于ArcSDE与OracleSpatial集成技术的空间数据设计方法

基于ArcSDE与OracleSpatial集成技术的空间数据设计方

乐恒
【期刊名称】《《电脑知识与技术》》
【年(卷),期】2011(007)005
【摘要】针对当前空间数据库随着数据量增大和数据种类增多运行效率降低的问题,该文通过分析当前的空间数据库和空间数据引擎技术,提出一种基于ArcSDE和Oracle Spatial集成技术的空间数据库设计方法。

通过对空间数据库里的不同格式的数据进行合理组织,从而实现提高空间数据库的性能和效率的目的。

【总页数】2页(P979-980)
【作者】乐恒
【作者单位】宁波市规划与地理信息中心浙江宁波 315040
【正文语种】中文
【中图分类】TP392
【相关文献】
1.基于OracleSpatial的空间数据库的索引与查询优化 [J], 钟伟清;武伟;杜国伟
2.基于ArcSDE与SQL Server的建筑物变形监测空间数据库构建 [J], 李亚;赵俊三
3.基于ArcSDE的自然资源空间数据库的创建及应用 [J], 李鹏举; 关锰
4.基于ArcSDE与SQL Server的建筑物变形监测空间数据库构建 [J], 李亚;赵俊

5.基于ArcSDE的空间数据库的创建及应用 [J], 李琪[1];王洪禄[2]
因版权原因,仅展示原文概要,查看原文内容请购买。

0CCI程序访问Spatial地理数据的一般过程研究

0CCI程序访问Spatial地理数据的一般过程研究
梁旭红;佟强
【期刊名称】《微型机与应用》
【年(卷),期】2004(023)003
【摘要】结合Wrapper Facade模式,给出OCCI程序访问Oracle Spatial的一般过程,并给出实例.
【总页数】3页(P17-18,25)
【作者】梁旭红;佟强
【作者单位】武汉大学GPS中心,430079;武汉大学计算机学院,430079
【正文语种】中文
【中图分类】TP3
【相关文献】
1.利用MapX访问Oracle Spatial空间数据库的研究 [J], 崔伦辉;张万昌
2.基于Oracle Spatial的ITS空间数据库的实现及访问 [J], 刘云生;李秋珍
3.基于OO4O访问Oracle9i Spatial空间数据 [J], 陆丽珍;刘南;刘仁义
4.用OO4O访问Oracle Spatial空间基础数据的方法 [J], 岳国森;王礼江;朱建军
5.OCI方式地理数据访问引擎的设计 [J], 任树敬;赵彦庆;周毅
因版权原因,仅展示原文概要,查看原文内容请购买。

GIS与Oracle数据库空间数据格式的转换

GIS与Oracle数据库空间数据格式的转换
李景文;陈大克;唐群
【期刊名称】《测绘》
【年(卷),期】2003(026)004
【摘要】MAPGIS软件支持多种GIS数据交换,且其明码数据格式较全面、清晰,易于读写.本文以MAPGIS明码数据格式和Oracle数据库为例,研究通过编程实现ASCII码格式的空间数据上载Oracle Spatial数据库的方法,探讨各类GIS软件与Oracle Spatial进行空间数据交换的基本过程.
【总页数】3页(P178-180)
【作者】李景文;陈大克;唐群
【作者单位】桂林工学院,土木工程系,广西,桂林,541004;桂林工学院,土木工程系,广西,桂林,541004;桂林工学院,土木工程系,广西,桂林,541004
【正文语种】中文
【中图分类】P208
【相关文献】
1.基于ArcGIS Data Interoperability的空间数据格式转换 [J], 奚凌云;王亚子
2.MAPGIS与Oracle数据库空间数据格式的转换 [J], 郝翠萍
3.GIS空间数据格式并行转换的调度算法 [J], 易法令;严圣华
4.简述EPS2008地理信息工作站中常用GIS空间数据格式的转换 [J], 李爽
5.基于FME的城市GIS基础空间数据格式转换 [J], 李刚;朱庆杰;张秀彦;王志涛
因版权原因,仅展示原文概要,查看原文内容请购买。

Oracle数据库10g GIS应用开发:使用Oracle Spatial网络数据模型说明书

Oracle Database 10g: Building GIS Applications Using the Oracle Spatial Network Data ModelAn Oracle Technical White PaperMay 2005Table of Contents Abstract (3)Introduction (3)Oracle Spatial Network Data Model (5)Network Data Model Schema (5)Network Metadata (6)Network Tables (6)Oracle Spatial Network Data Model APIs (6)Network Data Model Analysis Capabilities (7)Modeling Network Applications (8)Network Constraints (8)Java Representations of Network Elements (8)Software Requirements (9)Using the Network Data Model (9)1. Create a Network (9)2. Visualize or Edit the Network (9)3. Analyze the Network (9)Network Data Model Editor (9)GIS Applications using the Network Data Model (10)Network Tracing Applications (10)Network Routing Applications (10)Network Allocation Applications (11)Using Network Constraints in Analysis (11)New Features in the Oracle Spatial 10g Network Data Model (13)Network Modeling: Link Direction (13)Network Analysis: Maximum Flow Analysis (14)PL/SQL Wrapper Package (14)Conclusion (14)References (14)ABSTRACTNetwork modeling, management, and analysis are common tasks for Geographic Information Systems (GIS). Network analysis includes routing (path computation) in transportation networks, tracing (accessibility) in utility networks, and resource allocation in decision-making and customer relationship management (CRM) applications. In this paper we present the Oracle Spatial network data model, an Oracle Database release 10g feature that lets users model and analyze networks. This feature simplifies network modeling, analysis, and management so that users can focus on application logic. The network data model provides an open, generic data model with many common GIS analysis capabilities. In addition, it fully supports Oracle Spatial objects of type SDO_GEOMETRY. GIS applications based on the Oracle Spatial network data model are discussed in this paper. INTRODUCTIONThere are two common types of GIS applications: applications that deal with spatial proximity, and applications that deal with both spatial proximity and connectivity. For many applications queries on spatial proximity, which mainly consider metrics like Euclidean or geodetic distances, are sufficient. However, there are instances when connectivity needs to be taken into account, such as in finding the shortest distance between two locations in a road network. Many GIS applications are networks that require modeling and analysis on object relationships (connectivity). Figure 1 shows a road network of New York City.Figure 1. New York City Road Network (60384 nodes, 151962 links. Source: NavStreets from NavTech)Oracle Spatial has supported spatial objects since release 8.1.5. A complete set of indexes, operators, and functions is available for managing information based on spatial proximity. The network data model extends Oracle Spatial to deal with connectivity. Currently there are many GIS vendors offering network solutions; however, their solutions may have the following issues:• Their data model is stored in proprietary file formats, and cannot be integrated with their database.• The data model and analysis capabilities cannot be extended.• Application information cannot be separated from connectivity information.• Spatial information management and hierarchical relationships are not directly supported.To address these issues, Oracle Spatial network data model does the following: • Provides an open and persistent network data model.The network data model is stored as relational tables in the database and ismanaged through SQL.• Simplifies network data management and analysisPL/SQL and Java APIs are provided for network data management andanalysis.• Separates connectivity and application information in the data model Connectivity information can be separated from application information.Both application information and connectivity information are managed inthe database. However, only connectivity information is required fornetwork analysis.• Allows the extension of data model and analysis capabilitiesThe Java API provides representations of network elements as JavaInterfaces. Users can define their own network elements by extendingthese interfaces. As a result, users can implement their own user-definedrepresentations and analysis functions.• Integrates with Oracle Spatial technology for spatial information managementThe network data model supports all Oracle Spatial data types.This paper is organized as follows: it presents the network data model database schema, APIs and architecture; shows how to use the data model; presents several GIS network applications built on top of the data model; discusses how to use network constraints to enhance analysis capabilities; and discusses the network data model editor that is used to edit and visualize networks.ORACLE SPATIAL NETWORK DATA MODELThe network data model consists of two parts: a network schema and network APIs. The network schema is the persistent data storage used to store network information. The network APIs contain a PL/SQL package for data management in the database and a Java API for data management and analysis on the client-side (via Java JDBC drivers).Network Data Model SchemaA network contains network metadata, a node table, and a link table. In addition, path information (path table and path-link table) can be stored with the network if desired. Figure 2 shows a schematic view of a network in the database. Note that only connectivity information is stored. Additional application information can be stored in the network tables, or in other tables and referenced by foreign keys.Figure 2. Oracle Network Data Model (Schematic View)Network MetadataNetwork metadata provides general information about networks. It includes the following network details:• Directed or undirected• Logical or spatial• Hierarchical or flat• Information about nodes, links, and paths• Geometry information -- for spatial networksNetwork TablesAn Oracle network contains two tables: a node table and a link table. A path table can be added if needed. Figure 2 shows the schema for the network data model, which includes these tables. The schema represents the information necessary for network management and analysis. Application attributes can be added to these tables or referenced from other application tables (through foreign keys). Note that the network data model is also capable of handling geometry information. That is, the network data model can represent both logical and spatial network applications. Adding geometric data to a logical network will allow the logical network to be displayed.Oracle Spatial Network Data Model APIsThe network data model provides a PL/SQL API and a Java API for network management on the database and client sides. The Java API can also be used for network analysis. The three-tiered network data model application architecture is shown in Figure 3.Figure 3. Network Data Model ArchitectureNetwork Data Model Analysis CapabilitiesThe following analyses are supported in the network data model:• Shortest Path: The shortest path from node A to node B• Accessibility Analysis: Is node A accessible from node B?• Minimum-Cost Spanning Tree: What is the minimum-cost tree that connects all nodes?• Within Cost Analysis: What nodes are within a given cost from (to) a given node?• Nearest Neighbors: What are the N nearest neighbors of a given node?• K Shortest Paths: What are the K shortest paths from node A to node B?• Connected Components Analysis: Label connected components with IDs.• Graph Operations: Graph union, intersection, and difference.• Traveling Salesman Problem: What is the minimum-cost tour that visits a set of cities?• Single Source, Single Sink Maximum Flow Analysis: What is the maximum allowable flow that can flow from the source node to the sink node?(Oracle Spatial 10g Release 2)Modeling Network ApplicationsThe network data model takes a generic approach to solving network problems, by separating connectivity information from application-specific information. Figure 4 shows how a typical network application can be modeled and analyzed. First the network connectivity information (node connections and link cost) is extracted and separated from the application-specific information. Application-specific attributes are stored, if needed, with the connectivity information or separately. Once the connectivity information is extracted, network analysis is conducted on the generic model. Additional network constraints can also be considered. The final result is then mapped to application-related attributes, and displayed. This approach avoids customized network solutions and simplifies the data management of connectivity and application-specific information.Figure 4. Network Modeling and Analysis Using the Network Data ModelNetwork ConstraintsThe network data model introduces the concept of network constraints, which provides a mechanism to guide network analysis. For example, you may want to compute the shortest path that passes through network links of a specific type. With network constraints, applications can easily incorporate application-specific logic into the network data model analysis engine without knowing how the engine works. Other constraints, such as path depth, or cost, can also be included in analysis. The network constraint is a Java interface and must be implemented by the application.Java Representations of Network ElementsThe Java network representations (network, nodes, links, and paths) are defined as Java interfaces and can therefore be extended. These interfaces specify the necessary behaviors for the network and its elements. In addition to these interfaces, user-defined analysis functions can be used by applications, allowing the modeling and analysis capabilities of the network data model to be extended.Software RequirementsThe Spatial network data model is shipped with Oracle Database release 10g. The PL/SQL package is pre-loaded in the database and required Java .jar files are provided; the Java API supports JDK (or JRE) version 1.3 or later. The network editor is also included as a utility tool for the network data model. For more information, see the Oracle Spatial Topology and Network Data Models manual. USING THE NETWORK DATA MODELThis section explains the usage of the network data model. There are three major steps.1. Create a Network1. Create and populate network tables and add metadata to the database.2. Create a Java network object using the Java API and save it to thedatabase.2. Visualize or Edit the Network1. Load a network from the database or an XML representation.2. Visualize or edit the Java network object using the network data modeleditor. Store the network in the database, if needed.3. Analyze the Network1. Load a network into a Java network object.2. Conduct network analysis. Save the path results, if needed.NETWORK DATA MODEL EDITORThe network data model editor is a standalone Java application that helps create, edit, and visualize networks. The editor supports viewing operations such as pan, zoom, and auto-fit. It also provides functions to navigate between network elements. All analysis functions are supported in the editor. With the editor, users can create a network from scratch in the client-side and save it to the database. The editor is configurable on element styles, colors, and sizes. Figure 5 shows the network data model editor.Figure 5. Network Data Model EditorGIS APPLICATIONS USING THE NETWORK DATA MODELGIS network analysis may include network tracing, network routing, and network allocation.Network Tracing ApplicationsTracing applications deal with queries like Is node A reachable from node B? or What are the nodes that are reachable or can be reached from a given node? Such queries are common in water or utility networks. Another type of tracing analysis is to find out how many connected components are in a network. Figure 6 shows some such queries.Figure 6. Reachable and Reaching AnalysisNetwork Routing ApplicationsRouting analysis or path computation, probably the most studied topic in network applications, is divided into the following categories:• Shortest Path or Fastest Path (transitive closure problem) (see Figure 7).• K Shortest Paths: Find k shortest paths from a start node to a destination node.• Traveling Salesman Problem (see Figure 7): Find a minimum-cost tour that passes a set of locations.Figure 7. Shortest Path and Traveling Salesman ProblemNetwork Allocation ApplicationsAllocation analysis deals with designating destination points within a network. It provides information on a service area or coverage for points of interest. The network data model supports the following allocation analyses (see Figure 8):• Within Cost: Find all points of interest within a certain distance from a designated location.• Nearest Neighbors: Find the N nearest restaurants to a designated location.• Minimum-Cost Spanning Tree: Find the cheapest way to connect all nodes.Figure 8. Nearest Neighbors, Within Cost, and Minimum Cost Spanning Tree AnalysisUsing Network Constraints in AnalysisConstraints are conditions to be satisfied during analysis. The network data model supports network constraints so that applications can impose application-specific conditions on the network during analysis. The Java interface NetworkConstraint canbe implemented by the user, and passed into any network data model analysis function. Figure 9 shows analysis information that is available for users to implement their network constraintsFigure 9. Analysis Information for Network ConstraintsThe following are some examples of network constraints:• Depth (number of links), cost, and MBR constraintsNetwork analysis can be limited based on the depth of the search path, thecost limit, or the area (minimum bounding rectangle) where the analysisoccurs. These constraints can be used to specify a preferred subset ofpossible solutions. The network data model provides a SystemConstraintclass (which implements the NetworkConstraint class) for these commonnetwork constraints. Users can create an instance of SystemConstraint anduse it in analysis.• Temporarily inactivated nodes or linksSometimes nodes or links must be temporarily turned off before analysisbegins, for example, road segments (links) under construction in a roadnetwork, or water valves (nodes) shut down for repair in a water network.You can make a node or link inactive by setting its state to false. Networkelements that are inactive will not be considered during analysis. Note thatchanging the state of nodes and links does not affect the persistent datamodel.• Routing with specific types of links and nodesSometimes network analysis must only be conducted through nodes andlinks of specific types or with specific requirements.• Turn restrictionsTurn restrictions are constraints involving two links. They are common inrouting for transportation networks. In the following example, aprohibited turn is represented by a start link and an end link (see Figure10). For intersections with turn restrictions, such as no “U” turn or no leftturn, if the search encounters the start link of a prohibited turn, the searchdoes not continue through the end link of that prohibited turn. This typeof restriction can be easily modeled using NetworkConstraint, sinceinformation on the current link and next link is made available to users.Figure 10. Turn Modeling for Road NetworksNEW FEATURES IN THE ORACLE SPATIAL 10G NETWORK DATA MODELWith Oracle Spatial 10g Release 2, the network data model provides the following features:Network Modeling: Link DirectionThe directionality of a link can be further specified at the link level. Unlike the network directionality that determines the directions of all links, a directed network can have links that are directed or bi-directed. A BIDIRECTED column can be added to the link table and used to indicate if a directed link is bi-directed. This modeling enhancement will reduce the storage requirement for directed networks with non-homogeneous link directions (unidirectional and bidirectional).Network Analysis: Maximum Flow AnalysisThe maximum flow analysis function is provided for a single source and single sink flow network. Each link in a flow network has a flow capacity associated with it. The goal of this function is to find the maximum allowable flow that can flow from the source node to the sink node. This type of analysis is commonly seen in communication or logistics network planning.PL/SQL Wrapper PackagePrior to Oracle Spatial 10g Release 2, only the network data model Java API could be used for network editing and analysis. Now, a PL/SQL wrapper package is also provided that helps users edit and analyze networks in PL/SQL. This wrapper package provides nearly equivalent functionality as the Java API. It is done through database Java stored procedures and Java virtual machine in Oracle. CONCLUSIONThe Oracle Spatial network data model, available with Oracle Spatial 10g, is a generic network (graph) modeling and analysis environment for network applications. GIS applications for routing, tracing, and allocation have been discussed. The network data model provides an open, easy-to-use, scalable, efficient, and manageable approach to developing GIS network applications. We are currently working with our customers and partners to extend the modeling and analysis capabilities of the network data model.REFERENCESOracle Spatial Topology and Network Data Models, Oracle Corporation.Oracle Spatial User’s Guide and Reference, Oracle Corporation.Oracle Linear Referencing System: A Technical White Paper, Oracle Corporation. Oracle Spatial Network Data Model: A Technical White Paper, Oracle Corporation.Building GIS Applications Using the Oracle Spatial Network Data Model: An Oracle Technical White Paper May 2005Author: Jack Chenghua WangContributors: Vishal Rao, Nicole AlexanderOracle CorporationWorld Headquarters500 Oracle ParkwayRedwood Shores, CA 94065U.S.A.Worldwide Inquiries:Phone: +1.650.506.7000Fax: +1.650.506.7200Copyright © 2005, Oracle. All rights reserved.This document is provided for information purposes only and thecontents hereof are subject to change without notice.This document is not warranted to be error-free, nor subject to anyother warranties or conditions, whether expressed orally or impliedin law, including implied warranties and conditions of merchantabilityor fitness for a particular purpose. We specifically disclaim anyliability with respect to this document and no contractual obligationsare formed either directly or indirectly by this document. This documentmay not be reproduced or transmitted in any form or by any means,electronic or mechanical, for any purpose, without our prior written permission.Oracle, JD Edwards, and PeopleSoft are registered trademarks ofOracle Corporation and/or its affiliates. Other names may be trademarksof their respective owners.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Oracle Spatial中上载GIS空间数据方法研究摘要:采用Oracle Spatial 存储、管理空间数据,易于解决数据共享、分布式处理、网络通信、开放式开发、并发控制、网络化集成、跨平台运行及数据安全恢复机制等方面的难题,因而成为了目前的一种应用趋势。

而如何将现有GIS软件中产生的空间数据导入该数据库中成为该技术应用的首要关键环节。

本文以此为出发点,在探讨了向Oracle Spatial 上载GIS 的空间数据的基本原理的基础上,较全面地介绍了在Oracle Spatial中上载矢量数据与栅格数据的各种方法,重点介绍了使用Microsoft的ADO接口、Oracle Spatial的Java API及OCCI 接口等手工方式上载程序的实现过程。

最后,给出了全文的结论及相关的建议。

1引言空间数据是GIS的血液,对空间数据的管理的好坏将直接影响到GIS系统质量的高低。

GIS 空间数据的管理经过了纯文件方式管理图形数据与属性数据、图形数据文件方式管理与属性数据关系型数据库管理、空间数据与属性数据一体化的管理方式三个阶段。

目前,大多数GIS 软件都逐渐倾向于采用第三种管理方式,也就是图形数据与属性数据都采用数据库管理的方式。

例如,采用Oracle Spatial、DB2 Spatial Extender、Informix Spatial DataBlade(目前Informix已经被IBM收购)以及ArcSDE数据库引擎、MapGIS MapORA引擎等等。

Oracle Spatial提供了对象-关系模式和关系模式两种方式来存储空间数据。

前者的特征是空间表中有一个类型为MDSYS.SDO_GEOMETRY的字段,后者也就是Spatial的早期版本空间数据暗盒(Spatial Cartridge),其特征是每一个空间几何图层对应四个表,分别为_SDOLAYER、_SDODIM、_SDOGEOM与_SDOINDEX。

这些表并不包括属性数据,属性数据需建立连接。

目前许多GIS软件公司都提供了对Oracle Spatial的支持,比如Intergraph的GeoMedia 4.0、MapInfo的MapInfo 6.0、AutoDesk的MapGuide 6.0、ESRI的ArcSDE、ArcGIS以及国内中地公司的MapGIS 6.5等。

本文主要研究上载GIS的矢量数据和栅格数据到Oracle Spatial的原理与具体的各种实现方法,并在编程实践的基础上比较几种上载方法的优点与不足。

2 向Oracle Spatial上载GIS空间数据的原理向Oracle Spatial上载GIS空间数据,其实质也就是把空间数据的图形数据(包括矢量数据与栅格数据)与相应的属性数据写入数据库的表格中。

因此,在上载前必须清楚GIS空间数据的数据格式与Oracle Spatial中空间数据是如何存储的。

每个GIS软件拥有自己的内部数据格式和数据存储方式,大部分GIS软件并不向用户直接提供读写内部数据的函数。

为了与其它软件进行数据转换,通常定义一种外部数据交换格式,如MapInfo的*.mif/*.mid、MapGIS的明码格式与ESRI的Shape格式(非ASCII码格式)等等。

这些外部交换格式大部分为ASCII码文件,关于这些交换格式的数据结构的详细请参阅其公司发布的说明文档。

Oracle Spatial是一个对象-关系数据库,提供存储空间数据的类型是SDO_GEOMETRY。

随着Oracle 10g的推出,又给Spatial扩充了拓扑数据模型、网络数据模型与栅格数据模型,每种数据模型都有其各自的数据类型,比如类型SDO_TOPOGEOMETRY用来存储拓扑数据等。

在上载前一定要清楚这些数据类型的属性与方法,详细信息请参考文献1、2、3。

3 向Oracle Spatial上载GIS空间数据的方法上载空间数据的方法,总的来说可以分为使用GIS软件公司提供的工具与手工的方式上载两种方法。

本节主要介绍矢量数据与栅格数据的各种上载方法及其具体的实现过程。

3.1 矢量数据的上载方法3.1.1 使用手工的方式实现上载用户可以使用交互式的SQL语句上载GIS空间数据,使用这种方法也就是使用各种应用程序编程接口(如ADO、ODBC等等)来上载,用户可以以自己的应用需要为导向使用开发语言调用这些接口开发出各种各样的上载工具,即实现手工方式的加载。

本小节介绍了重点介绍使用Microsoft的ADO接口以及Oracle Spatial的Java API和OCCI接口实现空间数据的上载的实现过程。

3.1.1.1 使用Java API上载Oracle Spatial的Java API(Application Programing Interface)提供了3个类,即JGeometry、JGeometry.Point与DataException。

JGeometry类对应于Oracle Spatial的对象类型MDSYS.SDO_GEOMETRY,JGeometry.Point类对应于对象类型MDSYS.SDO_POINT_TYPE, DataException类表示异常。

下面的示例演示了如何使用Java API实现将GIS的空间数据写入Oracle Spatial中:/// 从数据库中读取空间数据ResultSet rs = statement.executeQuery("SELECT geoloc FROM countries where name='China'");STRUCT st = (oracle.sql.STRUCT) rs.getObject(1);//把结构体转换为geometry 对象JGeometry j_geom = JGeometry.load(st);// ... 在空间对象上执行空间操作或者创建新的空间对象.../// 向数据库中存储空间对象PreparedStatement ps = connection.prepareStatement("UPDATE countries set geometry=? where name=' China '");//把JGeometry对象转换为数据库的结构体。

STRUCT obj = JGeometry.store(j_geom, connection);ps.setObject(1, obj);ps.execute();3.1.1.2 OCCI上载示例该上载示例是使用OCCI(Oracle C++ Call Interface)上载空间数据的完整示例程序。

首先使用Oracle数据库数据类型翻译工具OTT(Oracle Type Translator)翻译类型MDSYS.SDO_POINT_TYPE与类型MDSYS.SDO_GEOMETRY,在命令行下输入,ott attraccess=private code=cpp cppfile=spatial_classeso.cpp hfile=spatial_classesh.h intype=spatial_types.typ mapfile=spatial_classesm.cpp mapfunc=RegisterClasses userid=scott/tiger@gis命令成功执行以后,就会生成4个文件,分别为spatial_classesh.h、spatial_classeso.cpp、spatial_classesm.h、与spatial_classesm.cpp;然后,在scott用户模式下创建空间表格(即存储空间数据的表格)spatial,实现的SQL语句如下:CREATE TABLE spatial(geoloc MDSYS.SDO_GEOMETRY);最后,利用VC++建立一个工程,把前面翻译的文件spatial_classesh.h、spatial_classeso.cpp、spatial_classesm.h、与spatial_classesm.cpp添加到工程中。

主文件的内容为,#include#include#include#include#include "spatial_classesh.h"#include "spatial_classesm.h"using namespace std;using namespace oracle::occi;const int SDO_GTYPE_2DPOINT = 2001;const int SDO_GTYPE_2DPOLYGON = 2003;const int SDO_ETYPE_POLYGON = 1003;const int SDO_INTERPRETATION_RECTANGLE = 3;void main(){try{//以OBJECT模式初始化环境变量Environment *env = Environment::createEnvironment(Environment::OBJECT); RegisterClasses(env);//注册类型函数Connection *conn = env->createConnection("scott","tiger","gis");try{ Statement *stmt = conn->createStatement("Insert Into spatial(geoloc) VALUES (:1)"); //存储空间对象Number srid_null;SDOPointType *point_null = new SDOPointType();point_null->setNull();SDOGeometry *spatial_obj = new SDOGeometry();//建立对象spatial_obj->setSdo_gtype(SDO_GTYPE_2DPOLYGON);spatial_obj->setSdo_srid(srid_null);//不设置坐标系spatial_obj->setSdo_point(point_null);//设置点对象为nullvector elem_info, ordinates;elem_info.clear();//清空elem_infoordinates.clear();//清空ordinates//存储elem_info对象elem_info.push_back(1);elem_info.push_back(SDO_ETYPE_POLYGON);elem_info.push_back(SDO_INTERPRETATION_RECTANGLE);spatial_obj->setSdo_elem_info(elem_info);//存储矩形,利用ordinates可以存储大于4000个字符的参数,ADO则小于4000 ordinates.push_back(1);ordinates.push_back(1);// (1,1)ordinates.push_back(5);ordinates.push_back(7);// (5,7)spatial_obj->setSdo_ordinates(ordinates);stmt->setObject(1, spatial_obj);stmt->executeUpdate();delete spatial_obj;//释放对象conn->terminateStatement(stmt);}catch (SQLException &ex){env->terminateConnection(conn);Environment::terminateEnvironment(env);throw; }env->terminateConnection(conn);Environment::terminateEnvironment(env); }catch (SQLException &ex){cout << "Error running Demo : " << ex.getMessage() << endl; }}编译成功之后,该工程就向Oracle Spatial的spatial表格中存储了一个矩形。

相关文档
最新文档