地理空间数据库课堂练习二.docx

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
地理空间数据库课堂练习二

/*课堂练习二*//*1.查找本数据库中所有的空间表*/select f_table_namefrom geometry_columns;/*2.查找streams表的空间参考系的授权*/select s.auth-sridfrom spatial_ref_sys s,geometry_columns gwhere g.f_table_name=streams and s.srid=g.srid;/*3.获得75号路的几何类型*/select st_geometrytype(centerlines)from divided_routes where name=路75;/*4.获得鹅岛的WKT表示*/select st_astext(boundary)from islandwhere name=鹅岛;/*5.判断名为路5,别名为“主街”的路段的几何属性是否为空*/select st_isempty(centerline)from road_segmentswhere name=路5 AND aliases = 主街;/*6.蓝湖的几何结构是否简单的*/select st_issimple(shore)from lakewhere name=蓝湖;/*7.获得鹅岛的边界*/select st_astext(st_boundary(boundary))from islandwhere name = 鹅岛;/*8.获得鹅岛的MBR边界*/select st_astext(st_envelope(boundary))from islandwhere name=鹅岛;/*9.获得卡姆桥的x,y坐标*/select st_x(position),st_Y(position)from bridgeswhere name=卡姆桥;/*10.获得102路段的起点和终点*/select st_astext(st_startpoint(centerline)),st_astext(st_endpoint(centerline))from road_segmentswhere fid=102;/*11.判断鹅岛的MBR边界是否闭合*/select st_isclosed(st_boundary(boundary))from islandwhere name=鹅岛;/*12.获得106路段的长度*/select st_length(centerline)from road_segmentswhere fid=106;/*13.获得102路段中点的数目*/select st_numpoints(centerline)from road_segmentswhere fid=102;/*14.获得102路段中点的第一个点*/select st_astext(st_pointn(centerline,1))from road_segmentswhere fid=102;/*15.获得鹅岛的质心*/select st_astext(st_centroid(boundary))from islandwhere name=鹅岛;/*16.判断PointOnSurface函数返回鹅岛上的点是否在其边界内*/select st_contains(boundary,st_pointonsurface(boundary))from islandwhere name=鹅岛;/*17.获得鹅岛的面积*/select st_area(boundary)from islandwhere name=鹅岛;/*18.获得蓝湖内环的数目*/select st_numinteriorring(shore)from lakeswhere name=蓝湖;/*19.判断75号路的几何元素的数目*/select st_numgeometries(centerlines)from divided_routeswhere name=路75;/*20.获得75号路的第2个几何元素*/select st_astext(st_geometryN(centerlines,2))from divided_routeswhere name=路75;/*21.获得75号路的长度*/select st_length(centerline)from divided_routewhere name=路75;/*22.判断鹅岛是否与其WKT表示构造的同样几何结构是否相等*/select st_equals(boundary,st_polyfromtext(polygon((67 13,67 18,59 18,59 13,67 13)),101))from islandwhere name=鹅岛;/*23.判断75号路是否与

文档评论(0)

yan698698 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档