zoukankan      html  css  js  c++  java
  • SQL函数介绍,SDE函数

    几何对象存取函数: 获取几何对象的WKT描述 ST_AsText(geometry) 获取几何对象的WKB描述 ST_AsBinary(geometry) 获取几何对象的空间参考ID ST_SRID(geometry) 获取几何对象的维数 ST_Dimension(geometry) 获取几何对象的边界范围 ST_Envelope(geometry) 判断几何对象是否为空 ST_IsEmpty(geometry) 判断几何对象是否不包含特殊点(比如自相交) ST_IsSimple(geometry) 判断几何对象是否闭合 ST_IsClosed(geometry) 判断曲线是否闭合并且不包含特殊点 ST_IsRing(geometry) 获取多几何对象中的对象个数 ST_NumGeometries(geometry) 获取多几何对象中第N个对象 ST_GeometryN(geometry,int) 获取几何对象中的点个数 ST_NumPoints(geometry) 获取几何对象的第N个点 ST_PointN(geometry,integer) 获取多边形的外边缘 ST_ExteriorRing(geometry) 获取多边形内边界个数 ST_NumInteriorRings(geometry) 同上 ST_NumInteriorRing(geometry) 获取多边形的第N个内边界 ST_InteriorRingN(geometry,integer) 获取线的终点 ST_EndPoint(geometry) 获取线的起始点 ST_StartPoint(geometry) 获取几何对象的类型 GeometryType(geometry) 类似上,但是不检查M值,即POINTM对象会被判断为point ST_GeometryType(geometry) 获取点的X坐标 ST_X(geometry) 获取点的Y坐标 ST_Y(geometry) 获取点的Z坐标 ST_Z(geometry) 获取点的M值 ST_M(geometry)   大讲堂首发,转载请注明出处 在SDE中,可以直接使用SQL语句进行空间数据的操作,包括: 空间关系的判断,空间分析,以及空间数据属性的提取。 1 用于空间关系判断的函数主要有: ST_Contains 当第二个几何完全被第一个几何包含的时候返回true 下载 (62.7 KB) 2009-4-22 15:29 用法: sde.st_contains (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_contains的详细使用说明请参考SQL functions reference ST_Crosses 当两个几何相交的时候返回true ,这个函数只适用于ST_MultiPoint/ST_Polygon, ST_MultiPoint/ST_LineString, ST_Linestring/ST_LineString,ST_LineString/ST_Polygon, and ST_LineString/ST_MultiPolygon之间的比较。 下载 (34.02 KB) 2009-4-22 15:29 用法: sde.st_crosses (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_crosses 的详细使用说明请参考SQL functions reference ST_Disjoint 当两个几何不相交的时候返回true 下载 (60.12 KB) 2009-4-22 15:29 用法: sde.st_disjoint (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_disjoint 的详细使用说明请参考SQL functions reference ST_Equals 当两个几何类型相同,并且坐标序列相同的时候返回true 下载 (43.09 KB) 2009-4-22 15:29 用法: sde.st_equals (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_equals 的详细使用说明请参考SQL functions reference ST_Intersects 当两个几何相交的时候返回true,是st_disjoint结果的非 用法: sde.st_intersects (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_intersects 的详细使用说明请参考SQL functions reference ST_Overlaps 当比较的2个几何维数相同并且相交,返回true 下载 (26.06 KB) 2009-4-22 15:29 用法: sde.st_overlaps (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_overlaps的详细使用说明请参考SQL functions reference ST_Touches 如果两个几何相交的部分都不在两个几何的内部,则返回true 下载 (35.81 KB) 2009-4-22 15:29 用法: sde.st_touches (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_touches的详细使用说明请参考SQL functions reference ST_Within 如果第一个几何完全在第二个几何内部,则返回true,和 ST_Contains的结果正好相反。 下载 (61.83 KB) 2009-4-22 15:29 用法: sde.st_within (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_within的详细使用说明请参考SQL functions reference 注意:在使用判断空间关系的SQL函数的时候,应该把SQL函数做为在WHERE条件语句的第一个语句,这样 才能使用空间索引,不然就会使用全表扫描。 2 空间分析函数: ST_Buffer 缓冲区分析 下载 (25.61 KB) 2009-4-22 15:29 用法: sde.st_buffer (g1 sde.st_geometry, distance double_precision) 关于st_buffer的详细使用说明请参考SQL functions reference ConvexHull 求几何的外包多边形,如果几何的顶点个数小于三个ConvexHull函数返回null 用法: sde.st_convexhull (g1 sde.st_geometry) 关于st_convexhull的详细使用说明请参考SQL functions reference ST_Difference 求两个几何的Difference ,下图中第一个几何为黑色,第二个几何为橘黄色 下载 (68.66 KB) 2009-4-22 15:29 用法: sde.st_difference (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_difference的详细使用说明请参考SQL functions reference ST_Intersection 求两个几何的交 下载 (72.32 KB) 2009-4-22 15:29 用法: sde.st_intersection (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_intersection的详细使用说明请参考SQL functions reference ST_SymmetricDiff 求几何的异或 下载 (81.08 KB) 2009-4-22 15:29 用法: sde.st_symmetricdiff (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_symmetricdiff 的详细使用说明请参考SQL functions reference ST_Union 求几何的并 下载 (78.84 KB) 2009-4-22 15:29 用法: sde.st_union (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_union的详细使用说明请参考SQL functions reference ST_Distance 求两个几何间的最短距离 下载 (58.85 KB) 2009-4-22 15:29 用法: sde.st_distance (g1 sde.st_geometry, g2 sde.st_geometry) 关于st_distance的详细使用说明请参考SQL functions reference 聚集函数: ST_Aggr_ConvexHull 返回一个multipolygon,这个multipolygon是所有输入几何的外包多边形。 ST_Aggr_Intersection 求所有输入几何相交的部分,返回一个几何 ST_Aggr_Union 求所有输入几何的并,返回一个几何,注意,这个函数只支持相同类型进行聚合合并 3空间数据属性提取的函数主要有: 1)求几何维度的函数: ST_Dimension ST_CoordDim 2) z值函数 ST_Is3D ST_Z ST_MaxZ ST_MinZ 3)量测值函数 ST_IsMeasured ST_M 4)取几何类型函数 ST_GeometryType ST_Entity 5)ST_Point相关函数 ST_X ST_Y ST_Z ST_M 6)面积和长度函数 ST_Length ST_Area 7)ST_LineString相关函数 ST_StartPoint—Returns the first point of the specified ST_LineString ST_EndPoint—Returns the last point of an ST_LineString ST_PointN—Takes an ST_LineString and an index to nth point and returns that point ST_Length—Returns the length of an ST_LineString as a double-precision number ST_NumPoints—Evaluates an ST_LineString and returns the number of points in its sequence as an integer ST_IsRing—A predicate function that returns 1 (TRUE) if the specified ST_LineString is a ring and 0 (FALSE) otherwise ST_IsClosed—A predicate function that returns 1 (TRUE) if the specified ST_LineString is closed and 0 (FALSE) if it is not 8)ST_MultiLineString 相关函数 ST_Length —returns the cumulative length of all of its ST_LineString elements as a double -precision number. ST_IsClosed—returns 1 (TRUE) if the specified ST_MultiLineString is closed and 0 (FALSE) if it is not closed. 9)ST_Polygon相关函数 ST_Area—Returns the area of an ST_Polygon as a double-precision number ST_Centroid—Returns an ST_Point that represents the center of the ST_Polygon's envelope ST_ExteriorRing—Returns the exterior ring of an ST_Polygon as an ST_LineString ST_InteriorRingN—Evaluates an ST_Polygon and an index and returns the nth interior ring as an ST_LineString ST_NumInteriorRing—Returns the number of interior rings that an ST_Polygon contains ST_PointOnSurface—Returns an ST_Point that is guaranteed to be on the surface of the specified ST_Polygon 10)ST_MultiPolygon相关函数 ST_Area —returns a double-precision number that represents the cumulative ST_Area of an ST_MultiPolygon's ST_Polygon elements. ST_Centroid — an ST_Point that is the center of an ST_MultiPolygon's envelope. ST_PointOnSurface —returns an ST_Point that is guaranteed to be normal to the surface of one of its ST_Polygon elements. 11)求几何坐标点个数函数 ST_NumGeometries— returns a count of the individual elements in a collection of geometries. ST_GeometryN — you can determine which geometry in the multipart geometry exists in position N; N being a number you provide with the funciton。 12)空间参考系相关函数 ST_SRID ST_EqualSRS 13) 其他函数 ST_Boundary ST_IsSimple ST_IsClosed ST_IsRing ST_IsEmpty ST_Envelope sde for oracle 存储机制研究系列 目录 1 BLOB数据在oracle 地理数据库中的存储方式 http://bbs.esrichina-bj.cn/ESRI/thread-44802-1-3.html 2 设置DBTUNE参数存储BLOB列 http://bbs.esrichina-bj.cn/ESRI/thread-44816-1-3.html 3 使用ST_Geometry存储空间数据 http://bbs.esrichina-bj.cn/ESRI/thread-44847-1-3.html 4 为使用ST_Geometry SQL函数配置oracle的网络服务 http://bbs.esrichina-bj.cn/ESRI/thread-44890-1-3.html 5 创建空间数据存储类型为ST_Geometry的要素类 http://bbs.esrichina-bj.cn/ESRI/thread-44900-1-2.html 6 使用SQL直接操纵FeatureClass(oracle) http://bbs.esrichina-bj.cn/ESRI/thread-44944-1-2.html 7 wkt与wkb http://bbs.esrichina-bj.cn/ESRI/thread-44951-1-1.html 8 SQL函数介绍 http://bbs.esrichina-bj.cn/ESRI/thread-45045-1-1.html 9 后记 http://bbs.esrichina-bj.cn/ESRI/thread-45048-1-1.html
  • 相关阅读:
    SPOJ 694 (后缀数组) Distinct Substrings
    POJ 2774 (后缀数组 最长公共字串) Long Long Message
    POJ 3693 (后缀数组) Maximum repetition substring
    POJ 3261 (后缀数组 二分) Milk Patterns
    UVa 1149 (贪心) Bin Packing
    UVa 12206 (字符串哈希) Stammering Aliens
    UVa 11210 (DFS) Chinese Mahjong
    UVa (BFS) The Monocycle
    UVa 11624 (BFS) Fire!
    HDU 3032 (Nim博弈变形) Nim or not Nim?
  • 原文地址:https://www.cnblogs.com/adodo1/p/4327998.html
Copyright © 2011-2022 走看看