PostGIS函数 ——ⅡPostGIS参考


PostGIS Geometry/Geography/Box Data Types(数据类型)

box2d—二维边界框。用于描述几何图形或几何图形集合的2D范围。

box2d— A 2-dimensional bounding box. Used to describe the 2D extent of a geometry or collection of geometries.

box3d— 3维边界框。用于描述几何图形或几何图形集合的3D范围。

box3d— A 3-dimensional bounding box. Used to describe the 3D extent of a geometry or collection of geometries.

geometry— 用平面坐标系表示空间要素的类型。

geometry— The type representing spatial features with planar coordinate systems.

geometry_dump—用于描述复杂几何图形各部分的复合类型。

geometry_dump— A composite type used to describe the parts of complex geometry.

geography—用大地(椭球体)坐标系表示空间特征的类型。

geography— The type representing spatial features with geodetic (ellipsoidal) coordinate systems.

TIPS 

1.CAST(myval As sometype) 或来指定类型转换myval::sometype


表管理功能

AddGeometryColumn—将几何列添加到现有表。

AddGeometryColumn— Adds a geometry column to an existing table.

DropGeometryColumn—从空间表中删除几何列。

DropGeometryColumn— Removes a geometry column from a spatial table.

DropGeometryTable—将表及其所有引用拖放到geometry_columns中。

DropGeometryTable— Drops a table and all its references in geometry_columns.

Find_SRID—返回为几何列定义的SRID。

Find_SRID— Returns the SRID defined for a geometry column.

Populate_Geometry_Columns—确保使用类型修饰符定义几何列或具有适当的空间约束。

Populate_Geometry_Columns— Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints.

UpdateGeometrySRID—更新几何列中的所有要素的SRID和表元数据。

UpdateGeometrySRID— Updates the SRID of all features in a geometry column, and the table metadata.


Geometry Constructors(构造)

ST_Collect—从一组几何创建一个GeometryCollection或Multi *几何。

ST_Collect— Creates a GeometryCollection or Multi* geometry from a set of geometries.

ST_LineFromMultiPoint—从MultiPoint几何图形创建LineString。

ST_LineFromMultiPoint— Creates a LineString from a MultiPoint geometry.

ST_MakeEnvelope—从最小和最大坐标创建一个矩形Polygon。

ST_MakeEnvelope— Creates a rectangular Polygon from minimum and maximum coordinates.

ST_MakeLine—从Point,MultiPoint或LineString几何形状创建线串。

ST_MakeLine— Creates a Linestring from Point, MultiPoint, or LineString geometries.

ST_MakePoint—创建2D,3DZ或4D点。

ST_MakePoint— Creates a 2D, 3DZ or 4D Point.

ST_MakePointM—从X,Y和M值创建一个点。

ST_MakePointM— Creates a Point from X, Y and M values.

ST_MakePolygon—从壳体和孔的可选列表创建多边形。

ST_MakePolygon— Creates a Polygon from a shell and optional list of holes.

ST_Point—使用给定的坐标值创建一个Point。ST_MakePoint的别名。

ST_Point— Creates a Point with the given coordinate values. Alias for ST_MakePoint.

ST_Polygon—从具有指定SRID的LineString创建多边形。

ST_Polygon— Creates a Polygon from a LineString with a specified SRID.

ST_TileEnvelope—使用XYZ tile system  在Web Mercator(SRID:3857)中创建矩形多边形。

ST_TileEnvelope— Creates a rectangular Polygon in Web Mercator (SRID:3857) using the XYZ tile system.


Geometry Accessors(访问)

GeometryType—以文本形式返回几何的类型。

GeometryType— Returns the type of a geometry as text.

ST_Boundary—返回几何的边界。

ST_Boundary— Returns the boundary of a geometry.

ST_CoordDim—返回几何的坐标维数。

ST_CoordDim— Return the coordinate dimension of a geometry.

ST_Dimension—返回几何的拓扑维数。

ST_Dimension— Returns the topological dimension of a geometry.

ST_Dump—返回一组geometry_dump行——几何体的组成部分。

ST_Dump— Returns a set of geometry_dump rows for the components of a geometry.

ST_DumpPoints—返回一组geometry_dump行——几何体中的点。

ST_DumpPoints— Returns a set of geometry_dump rows for the points in a geometry.

ST_DumpRings—返回一组geometry_dump行——一个多边形的内环和外环。

ST_DumpRings— Returns a set of geometry_dump rows for the exterior and interior rings of a Polygon.

ST_EndPoint—返回LineString或CircularLineString的最后一点。

ST_EndPoint— Returns the last point of a LineString or CircularLineString.

ST_Envelope—返回表示几何图形边界框的几何图形。

ST_Envelope— Returns a geometry representing the bounding box of a geometry.

ST_BoundingDiagonal—返回几何边界框的对角线。

ST_BoundingDiagonal— Returns the diagonal of a geometry's bounding box.

ST_ExteriorRing—返回表示多边形外环的LineString。

ST_ExteriorRing— Returns a LineString representing the exterior ring of a Polygon.

ST_GeometryN—返回几何集合的第N个几何元素。

ST_GeometryN— Return the Nth geometry element of a geometry collection.

ST_GeometryType—以文本形式返回几何的SQL-MM类型。

ST_GeometryType— Returns the SQL-MM type of a geometry as text.

ST_HasArc—测试几何图形是否包含圆弧

ST_HasArc— Tests if a geometry contains a circular arc

ST_InteriorRingN—返回多边形的第N个内环(孔)。

ST_InteriorRingN— Returns the Nth interior ring (hole) of a Polygon.

ST_IsPolygonCCW —测试多边形是否具有沿逆时针方向定位的外环和沿顺时针方向定位的内环。

ST_IsPolygonCCW — Tests if Polygons have exterior rings oriented counter-clockwise and interior rings oriented clockwise.

ST_IsPolygonCW —测试多边形是否具有顺时针定向的外环和逆时针定向的内环。

ST_IsPolygonCW — Tests if Polygons have exterior rings oriented clockwise and interior rings oriented counter-clockwise.

ST_IsClosed—测试LineStrings的起点和终点是否重合。对于PolyhedralSurface测试,是否封闭(体积)。

ST_IsClosed— Tests if a LineStrings's start and end points are coincident. For a PolyhedralSurface tests if it is closed (volumetric).

ST_IsCollection—测试几何是否为几何集合类型。

ST_IsCollection— Tests if a geometry is a geometry collection type.

ST_IsEmpty—测试几何是否为空。

ST_IsEmpty— Tests if a geometry is empty.

ST_IsRing—测试LineString是否闭合且简单。

ST_IsRing— Tests if a LineString is closed and simple.

ST_IsSimple—测试几何是否没有自相交或自相切的点。

ST_IsSimple— Tests if a geometry has no points of self-intersection or self-tangency.

ST_M—返回点的M坐标。

ST_M— Returns the M coordinate of a Point.

ST_MemSize—返回几何占用的内存空间量。

ST_MemSize— Returns the amount of memory space a geometry takes.

ST_NDims—返回几何的坐标维数。

ST_NDims— Returns the coordinate dimension of a geometry.

ST_NPoints—返回几何中的点(顶点)数。

ST_NPoints— Returns the number of points (vertices) in a geometry.

ST_NRings—返回多边形几何中的环数。

ST_NRings— Returns the number of rings in a polygonal geometry.

ST_NumGeometries—返回几何集合中的元素数。

ST_NumGeometries— Returns the number of elements in a geometry collection.

ST_NumInteriorRings—返回多边形的内部环数(孔)。

ST_NumInteriorRings— Returns the number of interior rings (holes) of a Polygon.

ST_NumInteriorRing—返回多边形的内部环(孔)数。ST_NumInteriorRings的别称

ST_NumInteriorRing— Returns the number of interior rings (holes) of a Polygon. Aias for ST_NumInteriorRings

ST_NumPatches—返回多面曲面上的面数。对于非多面体几何形状,将返回null。

ST_NumPatches— Return the number of faces on a Polyhedral Surface. Will return null for non-polyhedral geometries.

ST_NumPoints—返回LineString或CircularString中的点数。

ST_NumPoints— Returns the number of points in a LineString or CircularString.

ST_PatchN—返回多面曲面的第N个几何(面)

ST_PatchN— Returns the Nth geometry (face) of a PolyhedralSurface.。

ST_PointN—返回几何图形中第一个LineString或圆形LineString中的第N个点。

ST_PointN— Returns the Nth point in the first LineString or circular LineString in a geometry.

ST_Points—返回包含几何图形所有坐标的MultiPoint。

ST_Points— Returns a MultiPoint containing all the coordinates of a geometry.

ST_StartPoint—返回LineString的第一个点。

ST_StartPoint— Returns the first point of a LineString.

ST_Summary—返回几何内容的文本摘要。

ST_Summary— Returns a text summary of the contents of a geometry.

ST_X—返回点的X坐标。

ST_X— Returns the X coordinate of a Point.

ST_Y—返回点的Y坐标。

ST_Y— Returns the Y coordinate of a Point.

ST_Z—返回点的Z坐标。

ST_Z— Returns the Z coordinate of a Point.

ST_Zmflag—返回一个代码,该代码指示几何的ZM坐标维数。

ST_Zmflag— Returns a code indicating the ZM coordinate dimension of a geometry.


©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 200,667评论 5 472
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 84,361评论 2 377
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 147,700评论 0 333
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,027评论 1 272
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,988评论 5 361
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,230评论 1 277
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,705评论 3 393
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,366评论 0 255
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,496评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,405评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,453评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,126评论 3 315
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,725评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,803评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,015评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,514评论 2 346
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,111评论 2 341

推荐阅读更多精彩内容