




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、第三讲 空间查询与索引Data retrievalTo retrieve data from a databases we may perform a query:Retrieve names and addresses of all opencast coal mines in StaffordshireData may be retrieved by a simple look up and matchRetrieve names and addresses of all employees of Wedgwood Pottery who earn more than half the s
2、um earned by the managing directorNumerical comparisonSpatial data retrievalQuery: is there any correlation between:The location of vehicle accidents (as recorded on a hospital database); andDesignated “accident black spots” for the area?Satisfying this query will require the integration of both spa
3、tial and non-spatial informationPerformanceSpatial data is notoriously large and often hierarchically structuredGeospatial data is often embedded in the Euclidean plane, therefore spatial storage structures and access methods are required空间查询策略 Processing a spatial query QFilter step : find a supers
4、et S of object in answer to QUsing approximate of spatial data type and operatorRefinement step : find exact answer to Q reusing a GIS to process SUsing exact spatial data type and operation空间查询策略Approximate Spatial Data typesApproximating spatial data typesMinimum bounding rectangle/box (MBR or MBB
5、)approximates line string, polygon, MBRs are used by spatial indexes, e.g. R-treeAlgorithms for spatial operations MBRs are simple凸包(Convex Hull)一个最小凸多边形,点或在多边形边上或在其内部。空间查询类型Point query: retrieve all records with spatial references located at a particular pointRange query: retrieve all records with
6、spatial references located within a given range (spatial ranges may be any shape, but are often rectangular)(M. Worboys)Non spatial query: Retrieve the point location of Trentham GardensSpatial point query: Retrieve any site at location (37, 43)Spatial range query: Retrieve any site in the rectangle
7、 defined by (20, 20)(40, 50)Example空间查询特征B树索引空间索引网格索引网格索引Grid Structures: Fixed GridPartition of planar region into equal sized cellsPoints sharing the same cell (bucket) are stored togetherImproves range query performancePartition size depends on: Number of points; and Magnitude of average range qu
8、ery.Poor performance with non-uniform point distribution均匀网格索引算法计算机图形学中图元生成算法Grid Structures: Grid FileExtends fixed grid with arbitrary subdivision positions, accounting for point distribution网格排序与编码RowPeano-HilbertMortonSpiralCantor DiagonalRow-PrimeMorton CodeFrom WikipediaMorton CodeCode & Decod
9、e Algorithm:陈述彭等,地理信息系统概论,P77R树R树R树R树R树R树Spatial Query with SQL Simple SQL SELECT_FROM_WHERE examplesSpatial analysis operations Unary operator: AreaBinary operator: DistanceBoolean Topological spatial operations - WHERE clauseTouchCrossUsing spatial analysis and topological operationsBuffer, overla
10、pFunction From PostGISDistance(geometry, geometry) : numberEquals(geometry, geometry) : booleanDisjoint(geometry, geometry) : booleanIntersects(geometry, geometry) : booleanTouches(geometry, geometry) : booleanCrosses(geometry, geometry) : booleanOverlaps(geometry, geometry) : booleanContains(geomet
11、ry, geometry) : booleanLength(geometry) : numberArea(geometry) : numberCentroid(geometry) : geometryUsing spatial operation in SELECT clauseQuery: List the name, population, and area of each country listed in the Country table.SELECT C.Name,C.Pop, Area(C.Shape)AS Area” FROM Country CNote: This query
12、 uses spatial operation, Area().Note the use of spatial operation in place of a column in SELECT clause.Using spatial operator DistanceQuery: List the GDP and the distance of a countrys capital city to the equator for all countries.SELECT Co.GDP, Distance(Point(0,Ci.Shape.y),Ci.Shape) AS DistanceFRO
13、M Country Co,City CiWHERE Co.Name = Ci.Country AND Ci.Capital =Y Using Spatial Operation in WHERE clauseQuery: Find the names of all countries which are neighbors of the United States (USA) in the Country table.SELECT C1.Name AS Neighbors of USAFROM Country C1,Country C2WHERE Touch(C1.Shape,C2.Shape
14、)=1 AND C2.Name =USA Note: Spatial operator Touch() is used in WHERE clause to join Country table with itself. This query is an example of spatial self join operation.Spatial Query with multiple tablesQuery: For all the rivers listed in the River table, find the countries through which they pass.SEL
15、ECT R.Name, C.NameFROM River R, Country CWHERE Cross(R.Shape,C.Shape)=1Note: Spatial operation “Cross” is used to join River and Country tables. This query represents a spatial join operation.Example Spatial QueryBuffer and OverlapQuery: The St. Lawrence River can supply water to cities that are wit
16、hin 300 km. List the cities that can use water from the St. Lawrence.SELECT Ci.NameFROM City Ci, River RWHERE Overlap(Ci.Shape, Buffer(R.Shape,300)=1 AND R.Name =St.Lawrence Note: This query uses spatial operation of Buffer.GeoSVDM逻辑模型基于关系模型,设计核心逻辑结构GeoSVDM数据检索基于空间位置与空间关系的视频检索拓扑关系运算;方位关系运算;空间分析运算检索对
17、象被检索对象PointPolylinePolygonFramePointEqual/Distance/DirectionBuffer/ContainsContainsVideoLineWithinEqual/Buffer/CrossCross/ContainsFOVPolygonWithinCross/WithinContains/Within/Intersect基于空间位置与空间关系的视频检索方法检索与点q的距离小于d、且q在场景内的视频对象Select FrameID, VID, RectFrame, SVideo from Frame, Video, FramePoint where d
18、istance(q.Geometry,FramePoint.FPoint)=d and (abs(azimuth(FramePoint.FPoint,q.Geometry)-FramePoint.FYaw)=0.5*) and (Frame.FrameID=FramePoint.FrameID) and (Frame.VID=Video.VID)GeoSVDM数据检索基于线性参照系统的视频检索:根据点线事件检索检索某一道路上的视频片段与视频帧检索某一点处的视频帧与视频片段检索两点间的视频片段与视频帧基于点事件检索给定路径l上点q处的视频对象Select FrameID,RectFrame,VID,SVideo from PointEvents,Frame,Video,(Select Route from Route where RID=l.RID) r where(PointEvents.RID=l.RID) and (abs(Measure(q,r.Route) -PointEvents.MP)=d) and (PointEven
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年棉混纺纱行业深度研究分析报告
- 5《琥珀》(教学设计)2023-2024学年统编版语文四年级下册
- 12《在天晴了的时候》教学设计-2023-2024学年语文四年级下册统编版
- 全国河大音像版初中信息技术八年级上册第五章第三节《无人驾驶智能小车程序设计与实践》教学设计
- 6-1 《记念刘和珍君》教学设计 2024-2025学年统编版高中语文选择性必修中册
- 全国人教版高中信息技术必修一第1章1.3数据科学与大数据1.3.1《数据科学的兴起》教学设计
- 第十课稻田的守护者(教学设计)湖北科技版六年级上册综合实践活动
- 二手房改造装修合同模板
- 2025年度红薯种植与农业科技示范园区建设合同
- 2025年沼气集中供气系统项目建议书
- 马工程教材《公共财政概论》PPT-第二章 公共财政职能
- GB/T 15242.1-1994液压缸活塞和活塞杆动密封装置用同轴密封件尺寸系列和公差
- GB/T 13762-2009土工合成材料土工布及土工布有关产品单位面积质量的测定方法
- 酿酒工艺教案
- 地形图的识别及应用涉密地图的保密管理课件
- 腹腔镜手术的基本操作技巧课件
- 制造计量器具许可考核通用规范JJF12462010宣贯
- 隧道运营养护管理手册-下册
- 2023年山东司法警官职业学院单招综合素质考试笔试题库及答案解析
- 新审定人教版小学数学六年级下册教材分析课件
- 检验科医疗废物处置流程图52309
评论
0/150
提交评论