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— 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— 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.