Geometry Editors(编辑)
ST_AddPoint—将点添加到LineString。
ST_AddPoint— Add a point to a LineString.
ST_CollectionExtract—给定(多)几何,返回仅由指定类型的元素组成的(多)几何。
ST_CollectionExtract— Given a (multi)geometry, return a (multi)geometry consisting only of elements of the specified type.
ST_CollectionHomogenize—给定一个几何集合,返回内容的“最简单”表示。
ST_CollectionHomogenize— Given a geometry collection, return the "simplest" representation of the contents.
ST_Force2D—将几何强制为“二维模式”。
ST_Force2D— Force the geometries into a "2-dimensional mode".
ST_Force3D—将几何强制为XYZ模式。这是ST_Force3DZ的别名。
ST_Force3D— Force the geometries into XYZ mode. This is an alias for ST_Force3DZ.
ST_Force3DZ—将几何强制为XYZ模式。
ST_Force3DZ— Force the geometries into XYZ mode.
ST_Force3DM—将几何强制为XYM模式。
ST_Force3DM— Force the geometries into XYM mode.
ST_Force4D—将几何强制为XYZM模式。
ST_Force4D— Force the geometries into XYZM mode.
ST_ForcePolygonCCW —逆时针旋转所有外环,顺时针旋转所有内环。
ST_ForcePolygonCCW — Orients all exterior rings counter-clockwise and all interior rings clockwise.
ST_ForceCollection—将几何转换为GEOMETRYCOLLECTION。
ST_ForceCollection— Convert the geometry into a GEOMETRYCOLLECTION.
ST_ForcePolygonCW—顺时针定向所有外环,逆时针定向 所有内环。
ST_ForcePolygonCW — Orients all exterior rings clockwise and all interior rings counter-clockwise.
ST_ForceSFS—强制几何仅使用SFS 1.1几何类型。
ST_ForceSFS— Force the geometries to use SFS 1.1 geometry types only.
ST_ForceRHR—强制多边形中顶点的方向遵循右手规则。
ST_ForceRHR— Force the orientation of the vertices in a polygon to follow the Right-Hand-Rule.
ST_ForceCurve—将几何体转换成其curved类型(如果适用)。
ST_ForceCurve— Upcast a geometry into its curved type, if applicable.
ST_LineMerge—返回通过将MULTILINESTRING缝合在一起而形成的(一组)LineString。(多线合并)
ST_LineMerge— Return a (set of) LineString(s) formed by sewing together a MULTILINESTRING.
ST_Multi—将几何返回为MULTI *几何。
ST_Multi— Return the geometry as a MULTI* geometry.
ST_Normalize—以规范形式返回几何。
ST_Normalize— Return the geometry in its canonical form.
ST_QuantizeCoordinates —将坐标的最低有效位设置为零
ST_QuantizeCoordinates — Sets least significant bits of coordinates to zero
ST_RemovePoint—从线串中删除点。
ST_RemovePoint— Remove point from a linestring.
ST_Reverse—返回顶点顺序相反的几何。
ST_Reverse— Return the geometry with vertex order reversed.
ST_Segmentize—返回修改后的几何/地理,其片段不超过给定距离。
ST_Segmentize— Return a modified geometry/geography having no segment longer than the given distance.
ST_SetPoint—用给定的点替换线串的点。
ST_SetPoint— Replace point of a linestring with a given point.
ST_SnapToGrid—将输入几何图形的所有点捕捉到常规网格。
ST_SnapToGrid— Snap all points of the input geometry to a regular grid.
ST_Snap—将输入几何的线段和顶点对齐到参考几何的顶点。(zj:几何校正可用)
ST_Snap— Snap segments and vertices of input geometry to vertices of a reference geometry.
ST_SwapOrdinates—返回交换给定纵坐标值的给定几何的版本。
ST_SwapOrdinates— Returns a version of the given geometry with given ordinate values swapped.
TIPS
1.ST_QuantizeCoordinates ——PostGIS将所有坐标值存储为双精度浮点整数,可以可靠地表示15个有效数字。但是,PostGIS可用于管理本质上少于15个有效数字的数据。TIGER数据就是一个例子,它以地理坐标的形式提供,小数点后有六位精度(因此只需要九位有效经度和八位有效纬度)
2.Segmentize细分
Geometry Validation(几何有效性)
ST_IsValid—测试几何是否在2D中格式正确。
ST_IsValid— Tests if a geometry is well-formed in 2D.
ST_IsValidDetail—返回valid_detail行,说明几何是否有效,如果不是,则说明原因和位置。
ST_IsValidDetail— Returns a valid_detail row stating if a geometry is valid, and if not a reason why and a location.
ST_IsValidReason—返回说明几何图形是否有效或无效原因的文本。
ST_IsValidReason— Returns text stating if a geometry is valid, or a reason for invalidity.
TIPS
1. 这些功能根据OGC SFS标准测试几何形状是否有效。它们还提供有关无效性质和位置的信息。
Spatial Reference System Functions(空间参考系统)
ST_SetSRID—将几何图形上的SRID设置为特定的整数值。
ST_SetSRID— Set the SRID on a geometry to a particular integer value.
ST_SRID—返回空间索引表中定义的ST_Geometry的空间参考标识符。
ST_SRID— Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table.
ST_Transform—返回其坐标已转换为其他空间参考系统的新几何。
ST_Transform— Return a new geometry with its coordinates transformed to a different spatial reference system.
TIPS
1. work with the Spatial Reference System of geometries
Geometry Input(从文本或者二进制或者其他类型创建 geometry objects )
ST_BdPolyFromText—根据给定的闭合线串的任意集合构造一个Polygon,作为 MultiLineString WKT表示形式。
ST_BdPolyFromText— Construct a Polygon given an arbitrary collection of closed linestrings as a MultiLineString Well-Known text representation.
ST_BdMPolyFromText—根据给定的闭合线串的任意集合构造一个MultiPolygon,作为 MultiLineString WKT表示形式。
ST_BdMPolyFromText— Construct a MultiPolygon given an arbitrary collection of closed linestrings as a MultiLineString text representation Well-Known text representation.
ST_GeogFromText—从WKT或扩展返回指定的地理值。
ST_GeogFromText— Return a specified geography value from Well-Known Text representation or extended (WKT).
ST_GeographyFromText—从知名文本表示形式WKT或扩展返回指定的地理值。
ST_GeographyFromText— Return a specified geography value from Well-Known Text representation or extended (WKT)
ST_GeomCollFromText—使用给定的SRID从集合WKT生成集合Geometry。如果未提供SRID,则默认为0。
ST_GeomCollFromText— Makes a collection Geometry from collection WKT with the given SRID. If SRID is not given, it defaults to 0.
ST_GeomFromEWKT—从扩展的WKT(EWKT)返回指定的ST_Geometry值。
ST_GeomFromEWKT— Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).
ST_GeometryFromText—从(WKT)返回指定的ST_Geometry值。这是ST_GeomFromText的别名。
ST_GeometryFromText— Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText
ST_GeomFromText—从知名文本表示形式(WKT)返回指定的ST_Geometry值。
ST_GeomFromText— Return a specified ST_Geometry value from Well-Known Text representation (WKT).
ST_LineFromText—使用给定的SRID从WKT表示形式制作几何。如果未提供SRID,则默认为0。
ST_LineFromText— Makes a Geometry from WKT representation with the given SRID. If SRID is not given, it defaults to 0.
ST_MLineFromText—从WKT表示形式返回指定的ST_MultiLineString值。
ST_MLineFromText— Return a specified ST_MultiLineString value from WKT representation.
ST_MPointFromText—使用给定的SRID从WKT创建几何。如果未提供SRID,则默认为0。
ST_MPointFromText— Makes a Geometry from WKT with the given SRID. If SRID is not given, it defaults to 0.
ST_MPolyFromText—使用给定的SRID从WKT创建MultiPolygon Geometry。如果未提供SRID,则默认为0。
ST_MPolyFromText— Makes a MultiPolygon Geometry from WKT with the given SRID. If SRID is not given, it defaults to 0.
ST_PointFromText—使用给定的SRID从WKT创建点几何。如果未提供SRID,则默认为未知。
ST_PointFromText— Makes a point Geometry from WKT with the given SRID. If SRID is not given, it defaults to unknown.
ST_PolygonFromText—使用给定的SRID从WKT创建几何。如果未提供SRID,则默认为0。
ST_PolygonFromText— Makes a Geometry from WKT with the given SRID. If SRID is not given, it defaults to 0.
ST_WKTToSQL—从(WKT)返回指定的ST_Geometry值。这是ST_GeomFromText的别名。
ST_WKTToSQL— Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText
ST_GeogFromWKB—从一个(WKB)或扩展(EWKB)创建一个 geography实例。
ST_GeogFromWKB— Creates a geography instance from a Well-Known Binary geometry representation (WKB) or extended Well Known Binary (EWKB).
ST_GeomFromEWKB—从(EWKB)返回指定的ST_Geometry值。
ST_GeomFromEWKB— Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).
ST_GeomFromWKB—从(WKB)和可选的SRID创建geometry实例。
ST_GeomFromWKB— Creates a geometry instance from a Well-Known Binary geometry representation (WKB) and optional SRID.
ST_LineFromWKB— 使用给定的SRID从WKB中构建LINESTRING
ST_LineFromWKB— Makes a LINESTRING from WKB with the given SRID
ST_LinestringFromWKB—使用给定的SRID从WKB创建几何。
ST_LinestringFromWKB— Makes a geometry from WKB with the given SRID.
ST_PointFromWKB—使用给定的SRID从WKB创建几何
ST_PointFromWKB— Makes a geometry from WKB with the given SRID
ST_WKBToSQL—从众所周知的二进制表示形式(WKB)返回指定的ST_Geometry值。这是ST_GeomFromWKB的别名,不带srid
ST_WKBToSQL— Return a specified ST_Geometry value from Well-Known Binary representation (WKB). This is an alias name for ST_GeomFromWKB that takes no srid
ST_Box2dFromGeoHash—从GeoHash字符串返回BOX2D。
ST_Box2dFromGeoHash— Return a BOX2D from a GeoHash string.
ST_GeomFromGeoHash—从GeoHash字符串返回几何。
ST_GeomFromGeoHash— Return a geometry from a GeoHash string.
ST_GeomFromGML—将几何图形作为输入GML表示并输出PostGIS几何图形对象
ST_GeomFromGML— Takes as input GML representation of geometry and outputs a PostGIS geometry object
ST_GeomFromGeoJSON—将几何的geojson表示作为输入,并输出PostGIS几何对象
ST_GeomFromGeoJSON— Takes as input a geojson representation of a geometry and outputs a PostGIS geometry object
ST_GeomFromKML—将几何图形作为输入KML表示并输出PostGIS几何图形对象
ST_GeomFromKML— Takes as input KML representation of geometry and outputs a PostGIS geometry object
ST_GeomFromTWKB—从TWKB(“微小的已知二进制”)几何图形表示中创建几何图形实例。
ST_GeomFromTWKB— Creates a geometry instance from a TWKB ("Tiny Well-Known Binary") geometry representation.
ST_GMLToSQL—从GML表示形式返回指定的ST_Geometry值。这是ST_GeomFromGML的别名
ST_GMLToSQL— Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML
ST_LineFromEncodedPolyline—从编码折线创建LineString。
ST_LineFromEncodedPolyline— Creates a LineString from an Encoded Polyline.
ST_PointFromGeoHash—从GeoHash字符串返回一个点。
ST_PointFromGeoHash— Return a point from a GeoHash string.
Tips
1. create geometry objects from various textual or binary formats
Geometry Output(将 geometry objects 转换为文本或者二进制 或者其他)
ST_AsEWKT—返回带有SRID元数据的几何图形的(WKT)表示形式。
ST_AsEWKT— Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
ST_AsText—返回不带SRID元数据的几何/地理的(WKT)表示形式。
ST_AsText— Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
ST_AsBinary—返回不包含SRID元数据的几何/地理的(WKB)表示形式。
ST_AsBinary— Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
ST_AsEWKB—返回带有SRID元数据的几何的(WKB)表示形式。
ST_AsEWKB— Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.
ST_AsHEXEWKB—使用小尾数(NDR)或大尾数(XDR)编码,以HEXEWKB格式(作为文本)返回Geometry。
ST_AsHEXEWKB— Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.
ST_AsEncodedPolyline—从LineString几何返回编码多段线。
ST_AsEncodedPolyline— Returns an Encoded Polyline from a LineString geometry.
ST_AsGeobuf—返回一组行的Geobuf表示形式。
ST_AsGeobuf— Return a Geobuf representation of a set of rows.
ST_AsGeoJSON—将几何作为GeoJSON元素返回。
ST_AsGeoJSON— Return the geometry as a GeoJSON element.
ST_AsGML—将几何作为GML版本2或3返回。
ST_AsGML— Return the geometry as a GML version 2 or 3 element.
ST_AsKML—将几何作为KML元素返回。几种变体。默认版本= 2,默认最大十进制数字= 15
ST_AsKML— Return the geometry as a KML element. Several variants. Default version=2, default maxdecimaldigits=15
ST_AsLatLonText—返回给定点的度,分,秒表示。
ST_AsLatLonText— Return the Degrees, Minutes, Seconds representation of the given point.
ST_AsMVTGeom—将几何转换为 Mapbox Vector Tile的坐标空间。
ST_AsMVTGeom— Transform a geometry into the coordinate space of a Mapbox Vector Tile.
ST_AsMVT—聚合函数,返回一组行的Mapbox Vector Tile表示形式。
ST_AsMVT— Aggregate function returning a Mapbox Vector Tile representation of a set of rows.
ST_AsSVG—返回几何的SVG路径数据。
ST_AsSVG— Returns SVG path data for a geometry.
ST_AsTWKB—将几何返回为TWKB,又称“微小已知二进制”
ST_AsTWKB— Returns the geometry as TWKB, aka "Tiny Well-Known Binary"
ST_AsX3D—返回X3D xml节点元素格式的Geometry:ISO-IEC-19776-1.2-X3DEncodings-XML
ST_AsX3D— Returns a Geometry in X3D xml node element format: ISO-IEC-19776-1.2-X3DEncodings-XML
ST_GeoHash—返回几何的GeoHash表示形式。
ST_GeoHash— Return a GeoHash representation of the geometry.
TIPS
1. convert geometry objects into various textual or binary formats
Operators(运算符)
&&—返回TRUE A的2D边界框是否与B的2D边界框相交。
&&— Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.
&&(geometry,box2df)-返回TRUE几何的(缓存的)2D边界框是否与2D浮点精度边界框(BOX2DF)相交。
&&(geometry,box2df)— Returns TRUE if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF).
&&(box2df,geometry)—返回TRUE 2D浮点精度边界框(BOX2DF)与几何图形(缓存)的2D边界框是否相交。
&&(box2df,geometry)— Returns TRUE if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box.
&&(box2df,box2df)—返回TRUE两个2D浮点精度边界框(BOX2DF)是否相交。
&&(box2df,box2df)— Returns TRUE if two 2D float precision bounding boxes (BOX2DF) intersect each other.
&&&—返回TRUE A的nD边界框是否与B的nD边界框相交。
&&&— Returns TRUE if A's n-D bounding box intersects B's n-D bounding box.
&&&(geometry,gidx)—返回TRUE 几何的(缓存的)nD边界框是否与nD浮点精度边界框(GIDX)相交。
&&&(geometry,gidx)— Returns TRUE if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX).
&&&(gidx,geometry)—返回TRUEnD浮点精度边界框(GIDX)是否与几何体(缓存的)nD边界框相交。
&&&(gidx,geometry)— Returns TRUE if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box.
&&&(gidx,gidx)—返回TRUE两个nD浮点精度边界框(GIDX)是否相交。
&&&(gidx,gidx)— Returns TRUE if two n-D float precision bounding boxes (GIDX) intersect each other.
&<—返回TRUE A的边界框是否重叠或位于B的左侧。
&<— Returns TRUE if A's bounding box overlaps or is to the left of B's.
&<|—返回TRUE A的边界框是否重叠或低于B的边界框。
&<|— Returns TRUE if A's bounding box overlaps or is below B's.
&>—返回TRUE A'边界框是否重叠或位于B的右侧。
&>— Returns TRUE if A' bounding box overlaps or is to the right of B's.
<<—返回TRUE A的边界框是否严格位于B的左边。
<<— Returns TRUE if A's bounding box is strictly to the left of B's.
<<|— TRUE 如果A的边界框严格低于B的边界框,则返回。
<<|— Returns TRUE if A's bounding box is strictly below B's.
=—返回TRUE 几何/地理A的坐标和坐标顺序是否与几何B的坐标和坐标顺序相同。
=— Returns TRUE if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B.
>>—返回TRUE A的边界框是否严格位于B的右边。
>>— Returns TRUE if A's bounding box is strictly to the right of B's.
@—返回TRUE A的边界框是否包含在B的边界框内。
@— Returns TRUE if A's bounding box is contained by B's.
@(geometry,box2df)—返回TRUE 几何的2D边界框是否包含在2D浮点精度边界框(BOX2DF)中。
@(geometry,box2df)— Returns TRUE if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF).
@(box2df,geometry)—返回TRUE 是否将2D浮点精度边界框(BOX2DF)包含在几何的2D边界框中。
@(box2df,geometry)— Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box.
@(box2df,box2df)—返回TRUE一个2D浮点精度边界框(BOX2DF)是否包含在另一个2D浮点精度边界框中。
@(box2df,box2df)— Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box.
| &&>—返回TRUE A的边界框是否重叠或高于B的边界框。
|&>— Returns TRUE if A's bounding box overlaps or is above B's.
| >>—返回TRUE A的边界框是否严格高于B的边界框。
|>>— Returns TRUE if A's bounding box is strictly above B's.
〜—返回TRUE A的边界框是否包含B的边界。
~— Returns TRUE if A's bounding box contains B's.
〜(geometry,box2df)—返回TRUE 几何的2D绑定框是否包含2D浮点精度边界框(GIDX)。
~(geometry,box2df)— Returns TRUE if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).
〜(box2df,geometry)-返回TRUE 2D浮点精度边界框(BOX2DF)是否包含几何的2D绑定框。
~(box2df,geometry)— Returns TRUE if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box.
〜(box2df,box2df)—返回TRUE 2D浮点精度边界框(BOX2DF)是否包含另一个2D浮点精度边界框(BOX2DF)。
~(box2df,box2df)— Returns TRUE if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF).
〜=—返回TRUE A的边界框是否与B的边界框相同。
~=— Returns TRUE if A's bounding box is the same as B's.
<->—返回A和B之间的2D距离。
<->— Returns the 2D distance between A and B.
|=|—返回A和B轨迹之间最接近的点之间的距离。
|=|— Returns the distance between A and B trajectories at their closest point of approach.
<#>—返回A和B边界框之间的2D距离。
<#>— Returns the 2D distance between A and B bounding boxes.
<<->>—返回A和B边界框的形心之间的nD距离。
<<->>— Returns the n-D distance between the centroids of A and B bounding boxes.
<<#>>—返回A和B边界框之间的nD距离。
<<#>>— Returns the n-D distance between A and B bounding boxes.