空間數(shù)據(jù)庫課件:第四講 Oracle 及Oracle Spatial_第1頁
空間數(shù)據(jù)庫課件:第四講 Oracle 及Oracle Spatial_第2頁
空間數(shù)據(jù)庫課件:第四講 Oracle 及Oracle Spatial_第3頁
空間數(shù)據(jù)庫課件:第四講 Oracle 及Oracle Spatial_第4頁
空間數(shù)據(jù)庫課件:第四講 Oracle 及Oracle Spatial_第5頁
已閱讀5頁,還剩94頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、第四講 Oracle 及Oracle SpatialOracle簡介Oracle公司是全球最大的信息管理軟件及服務(wù)供應(yīng)商,也是全球第二大獨立軟件公司,成立于1977年,總部位于美國加州Redwoodshore,Oracle是世界上第一個商品化的關(guān)系型數(shù)據(jù)庫管理系統(tǒng),也是第一個在其全線產(chǎn)品中開發(fā)并部署100%基于互聯(lián)網(wǎng)企業(yè)軟件的公司,為世界上150個以上的國家提供數(shù)據(jù)庫、服務(wù)器、開發(fā)工具和企業(yè)應(yīng)用產(chǎn)品,還有相關(guān)的咨詢、教育和支持服務(wù)。Evolution of Oracle SQL EngineOracle81997Oracle8i1999Oracle9i2001Oracle9i R22002SQ

2、L /XML Integration (XMLType, URIType, etc.) OLAPDatetime TypesANSI JoinsCASE ExpressionsXML DBSQL/XMLW3C StandardsData MiningGridWeb ServicesRegular ExpressionsNative NumbersBLASTExpression FilterObjects ExtensionData Cartridges SQL/Java IntegrationinterMedia TypesData and Processing complexityOracl

3、e 10g2003二、ORACLE體系結(jié)構(gòu)總覽DatabaseInstanceSGARedo logbufferData buffercacheShared poolData dict.cacheLibrarycache PMON DBW0SMON LGWRCKPTOthersUserprocessServerprocessPGAControl filesData files Redo logfilesArchived log filesParameterfilePasswordfileFixed SGAORACLE體系結(jié)構(gòu)總覽OracleRedo Log BufferData BufferS

4、hared Pool后臺進程:SGA內(nèi)存DatabaseInstance表空間段區(qū)塊數(shù)據(jù)庫文件控制文件日志文件三個輔助文件:參數(shù)文件、口令文件,歸檔文件三個核心文件物理存儲邏輯存儲Oracle數(shù)據(jù)庫對象User Process and Server ProcessOracle-DBMSPMON, SMON, DBWR, LGWR,(1)支持大數(shù)據(jù)庫、多用戶的高性能的事務(wù)處理。(2)Oracle遵守數(shù)據(jù)存取語言、操作系統(tǒng)、用戶接口和網(wǎng)絡(luò)通信協(xié)議的工業(yè)標準。(3)實施安全性控制和完整性控制。(4)支持分布式數(shù)據(jù)庫和分布處理。(5)具有可移植性、可兼容性和可連接性。(6)支持UDT,其Spatial

5、廣泛用于GIS數(shù)據(jù)的存儲 Oracle特征RasterTopologyNetwork modellingSpatial MiningMapViewerOracle 7.3.3Spatial Data OptionPoints, Lines, PolygonsSpatial OperatorsOracle 8.0.4Spatial CartridgePoints, Lines, PolygonsSpatial Operators40% Faster PerformanceOracle 8iSpatial Data TypeSpatial OperatorsLinear ReferencingCo

6、ordinate TransformationLong transactions .1994 1995 1996 1997 1998 1999 2000 2001 2003 2004 2005 2007Replication, partitioningSpatial aggregationGeodetic coordinates Oracle 9i Oracle 10g Oracle 7.1.6Multi DimensionPoints OnlyOracle 11g 3D supportSolid modellingWeb servicesOracle對空間數(shù)據(jù)的支持Oracle對空間數(shù)據(jù)的支

7、持OGCWMS, WFS, GML, WFS-T, CS-W, KML, CityGML geometrytopologynetworksgeoraster3D modelsMapInfoIntergraphMapViewerESRIBentleyAutodeskOracle Spatial組成: 一個MDSYS Schema(模式),規(guī)定了對空間數(shù)據(jù)類型在存儲、語法、語義方面的支持; 一種空間索引機制(R-Tree,四叉樹); 一組操作過程和函數(shù)來執(zhí)行空間查詢和相關(guān)空間分析操作(服務(wù)器端空間操作算子); 相關(guān)管理工具。Oracle Spatial強大的線性參照系統(tǒng) 400 多個空間運算函數(shù),

8、如質(zhì)心和聚合函數(shù)GeoRaster 數(shù)據(jù)類型,支持地理參照柵格圖像的原生功能 支持更多文件格式以便加載和導(dǎo)出,支持更多的元數(shù)據(jù)和數(shù)據(jù)類型 存儲和分析網(wǎng)絡(luò)(圖形)結(jié)構(gòu)的數(shù)據(jù)模型 ,針對大型空間網(wǎng)絡(luò)的按需加載,增強的高級分析和建模特性可持續(xù)存儲和更新的拓撲的數(shù)據(jù)模型和模式 空間分析函數(shù) 支持地形模型、城市模型和虛擬世界的 3維數(shù)據(jù)類型,以及Lidar/PointCloud數(shù)據(jù)的支持Web服務(wù)支持(WFS 1.0/WFS-T 1.0/CSW 2.0/OpenLS 1.1/web服務(wù)安全性)支持SQL/MM 空間類型和操作符空間Java API 空間數(shù)據(jù)模型Oracle Spatial 在 MDSYS

9、 模式下定義了一系列幾何類型、函數(shù)來支持空間數(shù)據(jù)的存儲和使用,最為核心的是SDO_GEOMETRY 類型ArcSDE 也可以使用該類型。CREATE TYPE sdo_geometry AS OBJECT (SDO_GTYPE NUMBER,SDO_SRID NUMBER,SDO_POINT SDO_POINT_TYPE,SDO_ELEM_INFO MDSYS.SDO_ELEM_INFO_ARRAY,SDO_ORDINATES MDSYS.SDO_ORDINATE_ARRAY);(1)SDO_GTYPESDO_GTYPE是一個NUMBER型的數(shù)值,用來定義存儲對象的類型。SDO_GTYPE是一

10、個4個數(shù)字的整數(shù),其格式為dltt,其中d表示幾何對象的維數(shù);l表示三維線性參考系統(tǒng)中的線性參考值,當(dāng)d為3維或者4維時需要設(shè)置該值,一般情況下為空;tt為幾何對象的類型,Oracle Spatial定義了9種類型的幾何類型,目前,tt使用了00到09另外,10到99是Oracle Spatial保留的數(shù)字,以備將來幾何對象擴展所用。 (2)SDO_SRIDSDO_SRID也是一個NUMBER型的數(shù)值,它用于標識與幾何對象相關(guān)的空間坐標參考系。如果SDO_SRID為空(null),則表示沒有坐標系與該幾何對象相關(guān);如果該值不為空,則該值必須為MDSYS.CS_SRS表中SRID字段的一個值,在

11、創(chuàng)建含有幾何對象的表時,這個值必須加入到描述空間數(shù)據(jù)表元數(shù)據(jù)的USER_SDO_GEOM_METADATA視圖的SRID字段中。Oracle Spatial規(guī)定,一個幾何字段中的所有幾何對象都必須為相同的SDO_SRID值。 (3)SDO_POINTSDO_POINT是一個包含X,Y,Z數(shù)值信息的對象,用于表示幾何類型為點的幾何對象。如果SDO_ELEM_INFO和SDO_ORDINATES數(shù)組都為空,則SDO_POINT中的X,Y,Z為點對象的坐標值,否則,SDO_POINT的值可以忽略(用NULL表示)。Oracle Spatial強烈建議用SDO_POINT存儲空間實體為點類型空間數(shù)據(jù),

12、這樣可以極大的優(yōu)化Oracle Spatial的存儲性能,提高查詢效率。 (3)SDO_POINTSDO_POINT是一個包含X,Y,Z數(shù)值信息的對象,用于表示幾何類型為點的幾何對象。如果SDO_ELEM_INFO和SDO_ORDINATES數(shù)組都為空,則SDO_POINT中的X,Y,Z為點對象的坐標值,否則,SDO_POINT的值可以忽略(用NULL表示)。Oracle Spatial強烈建議用SDO_POINT存儲空間實體為點類型空間數(shù)據(jù),可以極大的優(yōu)化Oracle Spatial的存儲性能,提高查詢效率。 10000個點(4)SDO_ELEM_INFOSDO_ELEM_INFO是一個可變

13、長度的數(shù)組,每3個數(shù)作為一個元素單位,用于解釋坐標是如何存儲在SDO_ORDINATES數(shù)組中的。這里把組成一個元素的3個數(shù)稱為3元組。一個3元組包含以下3部分的內(nèi)容:l SDO_STARTING_OFFSETSDO_STARTING_OFFSET 表明每個幾何元素的第一個坐標在SDO_ORDINATES數(shù)組中的存儲位置。它的值從1開始,逐漸增加。 lSDO_ETYPE SDO_ETYPE 用于表示幾何對象中每個組成元素的幾何類型。當(dāng)它的值為1, 2, 1003和2003時,表明這個幾何元素為簡單元素。如果SDO_ETYPE為1003,表明該多邊形為外環(huán)(第一個數(shù)為1表示外環(huán)),坐標值以逆時針

14、存儲;如果SDO_ETYPE為2003,表明該多邊形為內(nèi)環(huán)(第一個數(shù)為2表示內(nèi)環(huán)),坐標值以順時針存儲。當(dāng)SDO_ETYPE為4, 1005和2005時,表明這個幾何元素為復(fù)雜元素。它至少包含一個3元組用以說明該復(fù)雜元素具有多少個簡單幾何元素。同樣,1005表示多邊形為外環(huán),坐標值以逆時針存儲;2005表示多邊形為內(nèi)環(huán),坐標值以順時針存儲。l SDO_INTERPRETATION SDO_INTERPRETATION具有兩層含義,具體的作用由SDO_ETYPE是否為復(fù)雜元素決定。如果SDO_ETYPE是復(fù)雜元素(4, 1005和2005),則SDO_INTERPRETATION表示它后面有幾個

15、子3元組屬于這個復(fù)雜元素。如果SDO_ETYPE是簡單元素(1, 2, 1003和2003),則SDO_INTERPRETATION表示該元素的坐標值在SDO_ORDINATES中是如何排列的。(5)SDO_ORDINATESSDO_ORDINATES是一個可變長度的數(shù)組,用于存儲幾何對象的真實坐標,該數(shù)組的類型為NUMBER型,它的最大長度為1048576。SDO_ORDINATES必須與SDO_ELEM_INFO數(shù)組配合使用,才具有實際意義。SDO_ORDINATES的坐標存儲方式由幾何對象的維數(shù)決定,如果幾何對象為三維,則SDO_ORDINATES的坐標以X1,Y1,Z1,X2,Y2,Z

16、2,.的順序排列,如果幾何對象為二維,則SDO_ORDINATES的坐標以X1,Y1,X2,Y2,.順序排列。 SDO_Geometryinsert into BJPIC.GEOD_COUNTRY values(20,MDSYS.SDO_GEOMETRY(2007,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,53,1003,1),MDSYS.SDO_ORDINATE_ARRAY(109.633316,18.113594,109.142250,18.347574,108.855591,18.499420,108.764137,19.077269,10

17、8.780563,19.204344,108.888641,19.312555,109.077347,19.420931,109.401825,19.701113,109.623779,19.676178,109.645920,19.752447,109.753990,19.930529,109.861320,19.918058,110.119545,。含有一個孔的多邊形的存儲SDO_GTYPE = 2003.2 表示是2維的,3 表示是一個多邊形。SDO_SRID = NULL.SDO_POINT = NULL.SDO_ELEM_INFO = (1,1003,1, 19,2003,1). 此

18、處有兩個三個一組的元素:1,1003,1 和 19,2003,1。1003 表示元素是一個外多邊形環(huán);2003表示元素是一個內(nèi)多邊形環(huán)。19 表示第二個元素(內(nèi)多邊形環(huán))的坐標從SDO_ORDINATES數(shù)組的第19個數(shù)字開始 (也就是說7,意思是第一個點的坐標為 7,5)。INSERT INTO cola_markets VALUES(10,polygon_with_hole,MDSYS.SDO_GEOMETRY(2003, - 2-dimensional polygonNULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1, 19,2003,1), MDS

19、YS.SDO_ORDINATE_ARRAY(2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4,7,5, 7,10, 10,10, 10,5, 7,5);含有一個孔的多邊形的存儲復(fù)雜對象的存儲第一組數(shù)字表示這個元素是一個復(fù)合多邊形,它由兩個曲線子元素組成,下兩組數(shù)字描述了這兩個子元素。第二組數(shù)字表示第一個曲線子元素由直線段組成,坐標起始點為1,結(jié)束點為第二條曲線的起始點5。因為是二維的,第一條曲線的結(jié)束點坐標在5和6。第三組數(shù)字表示第二個曲線子元素由一個圓弧組成,坐標起始點為5,結(jié)束點為下一條曲線的起始點或SDO_ORDINATES數(shù)組的當(dāng)前長

20、度(如果是最后一個元素)。集合類型的存儲MultipointSDO_GEOMETRY(2005, 32774, NULL,SDO_ELEM_INFO_ARRAY - multiple elements each with 1 pt(1,1,1, - triplet for first point element3,1,1, - triplet for second point element5,1,1 - triplet for third point element),SDO_ORDINATE_ARRAY(Xa, Ya, - coordinates of first pointXb, Yb,

21、 - coordinates of second pointXc, Yc - coordinates of third point)集合類型的存儲MultipointSDO_GEOMETRY(2005, 32774, NULL,SDO_ELEM_INFO_ARRAY - SDO_ELEM_INFO attribute(1, 1, 3 - Point cluster element with 3 points),SDO_ORDINATE_ARRAY(Xa, Ya, - coordinates of first pointXb, Yb, - coordinates of second pointX

22、c, Yc - coordinates of third point)推薦方式集合類型的存儲Multiline集合類型的存儲SELECT SDO_UTIL.APPEND(SDO_GEOMETRY(2003, 32774, null,SDO_ELEM_INFO_ARRAY(1,1003, 3),SDO_ORDINATE_ARRAY(1,1, 2,2),SDO_GEOMETRY(2003, 32774, NULL,SDO_ELEM_INFO_ARRAY(1, 1003, 3),SDO_ORDINATE_ARRAY(2,3, 4,5) FROM dual;SDO_UTIL.APPEND(SDO_GE

23、OMETRY(2003,32774,NULL,.-SDO_GEOMETRY(2007, - SDO_GTYPE= Multi-polygon32774, NULL,SDO_ELEM_INFO_ARRAY(1, 1003, 3, 5, 1003, 3),SDO_ORDINATE_ARRAY(1, 1, 2, 2, 2, 3, 4, 5)三維數(shù)據(jù)的存儲INSERT INTO geometry_examples (name, description, geom) VALUES(3-D POINT,3d Point , SDO_GEOMETRY (3001, - SDO_GTYPE format: D

24、00T. Set to 3001 for a 3-dimensional pointNULL, - No coordinate systemSDO_POINT_TYPE(2, - ordinate value for first dimension0 - ordinate value for second dimension2 - ordinate value for third dimension),NULL, - SDO_ELEM_INFO is not needed as SDO_POINT field is populatedNULL - SDO_ORDINATES is not ne

25、eded as SDO_POINT field is populated);三維點數(shù)據(jù)的存儲INSERT INTO geometry_examples (name, description, geom) VALUES(3-D LineString,3-dimensional LineString ,SDO_GEOMETRY(3002, - SDO_GTYPE format: D00T. Set to 3002 for a 3-dimensional lineNULL, - No coordinate systemNULL, - No data in SDO_POINT attributeSDO

26、_ELEM_INFO_ARRAY( 1, 2, 1),SDO_ORDINATES_ARRAY(2, - first dimension for first point0, - second dimension for first point2, - third dimension for first point4, - first dimension for second point2, - second dimension for second point4 - third dimension for second point);三維線數(shù)據(jù)的存儲ST_GeometryOracle也提供了另外

27、一種類型 ST_GEOMETRY,同時在此基礎(chǔ)上提供了一些符合 OGC Simple Features Access 規(guī)范的操作。 事實上還是通過對SDO_GEOMETRY 的包裝實現(xiàn)的。SQL select st_point(1,1) from dual; ST_POINT(1,1)(GEOM(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES) - ST_POINT(SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(1, 1, NULL), NULL, NULL) 幾何對象

28、的構(gòu)造空間數(shù)據(jù)的裝載與轉(zhuǎn)換Inserting Data into an SDO_GEOMETRY ColumnLoading from Text Files Using SQL*LoaderLOAD DATA INFILE *INTO TABLE sales_regionsAPPENDFIELDS TERMINATED BY |TRAILING NULLCOLS(id NULLIF ID = BLANKS,geom COLUMN OBJECT(SDO_GTYPE INTEGER EXTERNAL,SDO_POINT COLUMN OBJECT(X FLOAT EXTERNAL,Y FLOAT

29、EXTERNAL)BEGINDATA1|2001|-76.99022|38.888654|2|2001|-77.41575|38.924753|SQLLDR spatial/spatial CONTROL=sales_regions.ctl空間數(shù)據(jù)的裝載與轉(zhuǎn)換Transporting Spatial Data Between Oracle DatabasesImport/Export UtilitiesEXP spatial/spatial FILE=customers.dmp TABLES=customersIMP scott/tiger FILE=customers.dmp IGNORE=

30、Y INDEXES=N TABLES=CUSTOMERSLoading from External FormatsSHP2SDO customers -g location -x(-180,180) -y(-90,90) -s 8307 -t 0.5The SHP2SDOutility outputs three files:customers.sql;customers.ctl;customers.dat.SQLPLUS spatial/spatial customers.sqlSQLLDR spatial/spatial CONTROL=customers.ctl空間數(shù)據(jù)的裝載與轉(zhuǎn)換Con

31、verting Between SDO_GEOMETRY and WKT/WKBSELECT a.location.GET_WKT() wkt FROM customers a WHERE id=1;SELECT SDO_UTIL.TO_WKTGEOMETRY(a.location) wkt FROM customers a WHERE id=1; Converting SDO_GEOMETRY Data in GML SELECT TO_CHAR(SDO_UTIL.TO_GMLGEOMETRY(location) gml_location FROM customers WHERE id=1;

32、 -GML2.0SELECT TO_CHAR(SDO_UTIL.TO_GML311GEOMETRY();-3.1Converting GML to SDO_GEOMETRYSELECT SDO_UTIL.FROM_GML311GEOMETRY(TO_CLOB();空間索引Oracle支持R樹索引以及四叉樹索引create index idx_test_index_geom on spatial.test_index(geom) indextype is mdsys.spatial_index;需首先在視圖USER_SDO_GEOM_METADATA插入表元數(shù)據(jù)insert into mdsys

33、.user_sdo_geom_metadata(table_name,column_name,diminfo) values(TEST_INDEX,GEOM, SDO_DIM_ARRAY( SDO_DIM_ELEMENT(X,1,100000,1), SDO_DIM_ELEMENT(Y,1,100000,1);create index idx_continent_geom on spatial.continent(geom) indextype is mdsys.spatial_index parameters(SDO_LEVEL=8);空間運算Oracle支持多種空間算子 SDO_RELAT

34、E 操作比較特殊,它通過 mask 參數(shù)來判斷幾何對象間是否滿足某種空間關(guān)系空間運算Oracle支持多種空間算子 select continent from continent where sdo_inside(geom, SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(0,0,180,-90,180,90,0,0)=TRUE; select continent from continent where sdo_relate(geom, SDO_GEOMETRY(2003,NULL,NUL

35、L,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(0,0,180,-90,180,90,0,0), mask=INSIDE)=TRUE; 空間運算Oracle支持多種空間算子 緩沖分析select sdo_geom.sdo_buffer(SDO_GEOMETRY(2001,4326,SDO_POINT_TYPE(0,0, NULL),NULL,NULL),1000,1,arc_tolerance=0.1 unit=km) from dual;距離量測select objectid,sdo_geom.sdo_distance(SDO_GEOME

36、TRY(2001,NULL,SDO_POINT_TYPE(0,0, NULL),NULL,NULL),shape,0.01) from sdo_cities where objectid desc sdo_georaster Name Type - - RASTERTYPE NUMBER SPATIALEXTENT SDO_GEOMETRY RASTERDATATABLE VARCHAR2(32) RASTERID NUMBER METADATA SYS.XMLTYPEThe SDO_GEORASTER object type is included when Oracle Spatial i

37、s installed.The SDO_GEORASTER object type has five attributesThe pair (RASTERID, RASTERDATATABLE) uniquely identify a raster object in the database for specific user Various user-defined columnsSDO_GEORASTER object(for example, Boston)For eachrow (image):SDO_GEORASTER Object Type RASTERTYPE A five-d

38、igit number in the format d b t gt where: d identifies the number of spatial dimensions Currently must be 2 b indicates band or layer information 0 means one band or layer, 1 means more than one band or layer t must be set to 0, and is reserved for future use gt is the two-digit GeoRaster type, and

39、currently must be set to 01A RASTERTYPE of 20001 is raster data that has two dimensions and one band, and 21001 is raster data that has two spatial dimensions and one or more bandsSDO_GEORASTER Object Type SPATIALEXTENT defines the spatial extent or footprint associated with the raster data. The SPA

40、TIALEXTENT is of type SDO_GEOMETRY and its coordinate system is the model coordinate system if the raster data is georeferenced, or NULL if the raster data is not georeferenced.RASTERDATATABLE identifies the name of the raster data table. The raster data table contains the GeoRaster data, and has on

41、e row for each stored raster block. This table is created and managed by Oracle Spatial GeoRaster.RASTERID is used together with RASTERDATATABLE to uniquely identify all of the data associated with a GeoRaster object. METADATA is the XML metadata defined by Oracle Spatial GeoRaster SDO_RASTER Object

42、 TypeSQL desc sdo_raster Name Type - -RASTERID NUMBERPYRAMIDLEVEL NUMBERBANDBLOCKNUMBER NUMBERROWBLOCKNUMBER NUMBERCOLUMNBLOCKNUMBER NUMBERBLOCKMBR SDO_GEOMETRYRASTERBLOCK BLOBThe SDO_RASTER object type is included when Oracle Spatial is installed.SDO_RASTER Object Type RASTERID associates one or mo

43、re blocks of raster data in the raster data table with a specific row in a table containing the SDO_GEORASTER object type. Each block in the raster data table is stored in a separate row.PYRAMIDLEVEL is the pyramid level of the raster data. A PYRAMIDLEVEL of 0 indicates the data is at its original r

44、esolution, and at each increasing integer level indicates the reduction in resolution by a factor of two.BANDBLOCKNUMBER, ROWBLOCKNUMBER, and COLUMNBLOCKNUMBER are all defined in terms of the BLOCKSIZE the user or application chooses for the storage parameters of the raster data. These will be discu

45、ssed in a future slide.SDO_RASTER Object Type BLOCKMBR is the Minimum Bounding Rectangle around the the data stored in the block SDO_GEOMETRY type In cell coordinate space SDO_SRID = NULL All coordinates are integers (minimum row/column and maximum row/column) Currently not used, will be used for ir

46、regular blockingRASTERBOCK contains the raster cell data for the given block BLOB type (Binary Large OBject)Raster Data Table A raster data table is an object table that contains GeoRaster data. Only data of type SDO_RASTER Can be created by Oracle Spatial GeoRaster Can be created by user GeoRaster

47、in the DatabaseGeoRaster DatabaseOther related tables (VAT, LUT, and others)Table with GeoRaster Column.GeoRaster System DataRaster data table.BLOBsMapping Between SDO_GEORASTER Objects and SDO_RASTER Tables XXX_SDO_GEOR_SYSDATATABLE_NAMECOLUMN_NAMERDT_TABLE_NAMERASTERIDSDO_GEORASTERRasterDataTableR

48、asterIDTable with GeoRasterSDO_RASTERRasterID . . .SDO_RASTERRasterIdRaster Data TableLoading GeoRaster DataExample with server-side loader fileName := t_dir|/tgrimg2.tif;select georaster into geor from georaster_table where georid = 2 for update;mdsys.sdo_geor.importFrom(GeoTIFF,file, fileName,rebl

49、ock=true, blockSizeX=512,blockSizeY=512,geor);update georaster_table set georaster = geor where georid = 2;commit;Operations on GeoRaster ObjectsSDO_GEOR.copySDO_GEOR.changeFormat & changeFormatCopySDO_GEOR.subsetSDO_GEOR.scale and scaleCopySDO_GEOR.generatePyramid and deletePyramidSDO_GEOR.generate

50、SpatialExtentSDO_GEOR.mosaic And others ExportSDO_GEOR.exportTo will export GeoRaster objects to image files:ESRI World FileTIFF, JPEG, etc.But it will be very limited supportViewing GeoRaster DataTwo choices:Call exportTo to export georaster objects to image files and display them using standard br

51、owsers or toolsUse the simple standalone GeoRaster Viewer provided with GeoRasterOracle Spatial FeaturesG1G2G3G4G5n4e5f1f2f3f0n1n2n3n5n6n7n8n9e1e2e3e4e6e7e8e9e10Object ViewTopology ViewTopology in the DatabaseDatabase componentStorage of the topology and related featuresMetadata views Procedures to

52、create and populate topology related structuresSQL procedures to do validation of the topology Spatial index for topological dataRead-only applications using the topology data model and corresponding features should use the SQL interfaces in the database Topology JAVA APIJAVA componentA toolkit for

53、developing editing applications based on topological data modelEditing applications must use the JAVA API to manage all the topology editing operationsAdd to a topologyRemove topological elementsUpdate topologyInternally, the JAVA API ensures the necessary relationships between features and the topo

54、logical elements the features are composed of remain consistentFeature ModelHow do users/applications map features to the topological elements the features are composed of?For instance:Determine the street name associated with a particular edgeDisplay the faces (parcel) given a map/lot number Users/

55、Applications create feature tablesStore attribute information associated with spatial featuresOne feature table for each layerFeature Model ExampleExamples of area/linear/point featuresF1E7E6E4E5E3E2E1F2N1N2N6N3N5N4Linear Feature: (E1,-E2)Point Feature: (N3)Area Feature: (F1,F2)Spatial Feature Table

56、sCreate Table Land_Parcels (ParcelKey NUMBER PRIMARY KEY,BookID VARCHAR2(15) MapID VARCHAR2(15),ParcelID VARCHAR2(15),Owner VARCHAR2(30),Other attributes if requiredFeature SDO_TOPO_GEOMETRY);The new type, SDO_TOPO_GEOMETRY, is added for topology. A constructor is used with this type for relating to

57、pological elements and feature attributes, and a user-defined constructor is used when loading attributes associated with topological elementsSpatial Topo-Geometry LayerColumn of type SDO_TOPO_GEOMETRY in a TableSimilar concept to SDO_GEOMETRY layerFrom an application point of view, this is similar

58、to current geometry layerEach layer has a unique ID in a topologyTopology Manager manages metadata for each Topo-Geometry layerUSER_SDO_TOPO_INFOALL_SDO_TOPO_INFOSDO_TOPO_GEOMETRYSQL describe sdo_topo_geometry Name Null? Type - - - TG_TYPE NUMBER TG_ID NUMBER TG_LAYER_ID NUMBER TOPOLOGY_ID NUMBERMET

59、HOD-MEMBER FUNCTION GET_GEOMETRY RETURNS SDO_GEOMETRYSDO_TOPO_GEOMETRYSimilar in concept to SDO_GEOMETRYTG_TYPE - Type of topology geometry 1 = point or multipoint 2 = line or multi-line 3 = polygon or multi-polygon4 = heterogeneous collectionTG_ID - Unique ID (generated by Spatial) for the topology

60、 geometryTG_LAYER_ID - System-assigned ID for the topology geometry layer This number is unique within the topology geometry layerTOPOLOGY_ID Unique ID of the topologySDO_TOPO_GEOMETRY Constructor (1)TOPOLOGY is the name of the topology, specified when the topology was created TG_TYPE is the Geometr

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論