3 ORACLE 10g的安装与使用-spatial实例

上传人:熏** 文档编号:243805696 上传时间:2024-09-30 格式:PPT 页数:65 大小:5.44MB
返回 下载 相关 举报
3 ORACLE 10g的安装与使用-spatial实例_第1页
第1页 / 共65页
3 ORACLE 10g的安装与使用-spatial实例_第2页
第2页 / 共65页
3 ORACLE 10g的安装与使用-spatial实例_第3页
第3页 / 共65页
点击查看更多>>
资源描述
单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,Oracle 10g,的安装和使用,及,Oracle Spatial,实例分析,1,、从安装程序安装,Oracle 10g,2.,利用,Database Configuration Assistant,创,建数据库,3,、还可以从,Universal Installer,安装,Oracle 10g,4,、,Oracle 10g,网络管理,Net manager,5,、,Oracle 10g,数据库管理,6,、,Oracle Spatial,实例分析,Oracle Spatial,实例分析,drop INDEX,cola_spatial_idx,;,drop TABLE,cola_markets,;,Delete from USER_SDO_GEOM_METADATA;,CREATE TABLE,cola_markets,(,mkt_id,NUMBER PRIMARY KEY,name VARCHAR2(32),shape MDSYS.SDO_GEOMETRY);,INSERT INTO,cola_markets,VALUES(,1,cola_a,MDSYS.SDO_GEOMETRY(,2003, - 2-dimensional polygon,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3), - one rectangle (1003 = exterior),MDSYS.SDO_ORDINATE_ARRAY(1,1, 5,7) - only 2 points needed to,);,INSERT INTO,cola_markets,VALUES(,2,cola_b,MDSYS.SDO_GEOMETRY(,2003, - 2-dimensional polygon,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),- one polygon (exterior polygon ring),MDSYS.SDO_ORDINATE_ARRAY(5,1, 8,1, 8,6, 5,7, 5,1),);,INSERT INTO,cola_markets,VALUES(,3,cola_c,MDSYS.SDO_GEOMETRY(,2003, - 2-dimensional polygon,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),- one polygon (exterior polygon ring),MDSYS.SDO_ORDINATE_ARRAY(3,3, 6,3, 6,5, 4,5, 3,3),);,INSERT INTO,cola_markets,VALUES(,2,cola_b,MDSYS.SDO_GEOMETRY(,2003, - 2-dimensional polygon,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), - one polygon (exterior polygon ring),MDSYS.SDO_ORDINATE_ARRAY(5,1, 8,1, 8,6, 5,7, 5,1),);,INSERT INTO,cola_markets,VALUES(,3,cola_c,MDSYS.SDO_GEOMETRY(,2003, - 2-dimensional polygon,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), - one polygon (exterior polygon ring),MDSYS.SDO_ORDINATE_ARRAY(3,3, 6,3, 6,5, 4,5, 3,3),);,INSERT INTO,cola_markets,VALUES(,4,cola_d,MDSYS.SDO_GEOMETRY(,2003, - 2-dimensional polygon,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,4), - one circle,MDSYS.SDO_ORDINATE_ARRAY(8,7, 10,9, 8,11),),);,-,更新原数据表,INSERT INTO USER_SDO_GEOM_METADATA,VALUES (,cola_markets,shape,MDSYS.SDO_DIM_ARRAY,( - 20X20 grid,MDSYS.SDO_DIM_ELEMENT(X, 0, 20, 0.005),MDSYS.SDO_DIM_ELEMENT(Y, 0, 20, 0.005),),NULL - SRID,);,-,创建空间索引,-,CREATE INDEX,cola_spatial_idx,ON,cola_markets(shape,),INDEXTYPE IS MDSYS.SPATIAL_INDEX;,-,空间查询,-,SELECT,SDO_GEOM.SDO_INTERSECTION(c_a.shape,c_c.shape, 0.005),FROM,cola_markets,c_a,cola_markets,c_c,WHERE,c_a.name,= ,cola_a, AND,c_c.name,= ,cola_c,;,- Do two geometries have any spatial relationship?,SELECT,SDO_GEOM.RELATE(c_b.shape, ,anyinteract,c_d.shape, 0.005),FROM,cola_markets,c_b,cola_markets,c_d,WHERE,c_b.name,= ,cola_b, AND,c_d.name,= ,cola_d,;,- Return the areas of all cola markets.,SELECT name,SDO_GEOM.SDO_AREA(shape, 0.005) FROM,cola_markets,;,- Return the area of just,cola_a,.,SELECT,c.name,SDO_GEOM.SDO_AREA(c.shape, 0.005) FROM,cola_markets,c,WHERE,c.name,= ,cola_a,;,- Return the distance between two geometries.,SELECT,SDO_GEOM.SDO_DISTANCE(c_b.shape,c_d.shape, 0.005),FROM,cola_markets,c_b,cola_markets,c_d,WHERE,c_b.name,= ,cola_b, AND,c_d.name,= ,cola_d,;,- Is a geometry valid?,SELECT,c.name,SDO_GEOM.VALIDATE_GEOMETRY(c.shape, 0.005),FROM,cola_markets,c WHERE,c.name,= ,cola_c,;,- Is a layer valid? (First, create the results table.),CREATE TABLE,validation_results,(,mkt_id,number, result varchar2(10);,EXECUTE SDO_GEOM.VALIDATE_LAYER(COLA_MARKETS, SHAPE, MKT_ID,VALIDATION_RESULTS);,SELECT * from,validation_results,;,
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 小学资料


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!