Geometry Editors(編輯)
ST_AddPoint—將點(diǎn)添加到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—給定一個(gè)幾何集合垮媒,返回內(nèi)容的“最簡單”表示倔韭。
ST_CollectionHomogenize— Given a geometry collection, return the "simplest" representation of the contents.
ST_Force2D—將幾何強(qiáng)制為“二維模式”。
ST_Force2D— Force the geometries into a "2-dimensional mode".
ST_Force3D—將幾何強(qiáng)制為XYZ模式芝此。這是ST_Force3DZ的別名憋肖。
ST_Force3D— Force the geometries into XYZ mode. This is an alias for ST_Force3DZ.
ST_Force3DZ—將幾何強(qiáng)制為XYZ模式。
ST_Force3DZ— Force the geometries into XYZ mode.
ST_Force3DM—將幾何強(qiáng)制為XYM模式婚苹。
ST_Force3DM— Force the geometries into XYM mode.
ST_Force4D—將幾何強(qiáng)制為XYZM模式岸更。
ST_Force4D— Force the geometries into XYZM mode.
ST_ForcePolygonCCW?—逆時(shí)針旋轉(zhuǎn)所有外環(huán),順時(shí)針旋轉(zhuǎn)所有內(nèi)環(huán)膊升。
ST_ForcePolygonCCW?— Orients all exterior rings counter-clockwise and all interior rings clockwise.
ST_ForceCollection—將幾何轉(zhuǎn)換為GEOMETRYCOLLECTION怎炊。
ST_ForceCollection— Convert the geometry into a GEOMETRYCOLLECTION.
ST_ForcePolygonCW—順時(shí)針定向所有外環(huán),逆時(shí)針定向?所有內(nèi)環(huán)廓译。
ST_ForcePolygonCW?— Orients all exterior rings clockwise and all interior rings counter-clockwise.
ST_ForceSFS—強(qiáng)制幾何僅使用SFS 1.1幾何類型评肆。
ST_ForceSFS— Force the geometries to use SFS 1.1 geometry types only.
ST_ForceRHR—強(qiáng)制多邊形中頂點(diǎn)的方向遵循右手規(guī)則。
ST_ForceRHR— Force the orientation of the vertices in a polygon to follow the Right-Hand-Rule.
ST_ForceCurve—將幾何體轉(zhuǎn)換成其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—以規(guī)范形式返回幾何院仿。
ST_Normalize— Return the geometry in its canonical form.
ST_QuantizeCoordinates?—將坐標(biāo)的最低有效位設(shè)置為零
ST_QuantizeCoordinates?— Sets least significant bits of coordinates to zero
ST_RemovePoint—從線串中刪除點(diǎn)秸抚。
ST_RemovePoint— Remove point from a linestring.
ST_Reverse—返回頂點(diǎn)順序相反的幾何。
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—用給定的點(diǎn)替換線串的點(diǎn)。
ST_SetPoint— Replace point of a linestring with a given point.
ST_SnapToGrid—將輸入幾何圖形的所有點(diǎn)捕捉到常規(guī)網(wǎng)格排惨。
ST_SnapToGrid— Snap all points of the input geometry to a regular grid.
ST_Snap—將輸入幾何的線段和頂點(diǎn)對齊到參考幾何的頂點(diǎn)吭敢。(zj:幾何校正可用)
ST_Snap— Snap segments and vertices of input geometry to vertices of a reference geometry.
ST_SwapOrdinates—返回交換給定縱坐標(biāo)值的給定幾何的版本。
ST_SwapOrdinates— Returns a version of the given geometry with given ordinate values swapped.
TIPS
1.ST_QuantizeCoordinates?——PostGIS將所有坐標(biāo)值存儲(chǔ)為雙精度浮點(diǎn)整數(shù)暮芭,可以可靠地表示15個(gè)有效數(shù)字鹿驼。但是欲低,PostGIS可用于管理本質(zhì)上少于15個(gè)有效數(shù)字的數(shù)據(jù)。TIGER數(shù)據(jù)就是一個(gè)例子畜晰,它以地理坐標(biāo)的形式提供砾莱,小數(shù)點(diǎn)后有六位精度(因此只需要九位有效經(jīng)度和八位有效緯度)
2.Segmentize細(xì)分
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. 這些功能根據(jù)OGC SFS標(biāo)準(zhǔn)測試幾何形狀是否有效。它們還提供有關(guān)無效性質(zhì)和位置的信息峭范。
Spatial Reference?System Functions(空間參考系統(tǒng))
ST_SetSRID—將幾何圖形上的SRID設(shè)置為特定的整數(shù)值财松。
ST_SetSRID— Set the SRID on a geometry to a particular integer value.
ST_SRID—返回空間索引表中定義的ST_Geometry的空間??參考標(biāo)識符。
ST_SRID— Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table.
ST_Transform—返回其坐標(biāo)已轉(zhuǎn)換為其他空間參考系統(tǒng)的新幾何纱控。
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(從文本或者二進(jìn)制或者其他類型創(chuàng)建??geometry objects )
ST_BdPolyFromText—根據(jù)給定的閉合線串的任意集合構(gòu)造一個(gè)Polygon辆毡,作為 MultiLineString WKT表示形式。
ST_BdPolyFromText— Construct a Polygon given an arbitrary collection of closed linestrings as a MultiLineString Well-Known text representation.
ST_BdMPolyFromText—根據(jù)給定的閉合線串的任意集合構(gòu)造一個(gè)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或擴(kuò)展返回指定的地理值喷户。
ST_GeogFromText— Return a specified geography value from Well-Known Text representation or extended (WKT).
ST_GeographyFromText—從知名文本表示形式WKT或擴(kuò)展返回指定的地理值唾那。
ST_GeographyFromText— Return a specified geography value from Well-Known Text representation or extended (WKT)
ST_GeomCollFromText—使用給定的SRID從集合WKT生成集合Geometry。如果未提供SRID褪尝,則默認(rèn)為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—從擴(kuò)展的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沙庐,則默認(rèn)為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創(chuàng)建幾何拱雏。如果未提供SRID,則默認(rèn)為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創(chuàng)建MultiPolygon Geometry铸抑。如果未提供SRID,則默認(rèn)為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創(chuàng)建點(diǎn)幾何鹊汛。如果未提供SRID蒲赂,則默認(rèn)為未知。
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創(chuàng)建幾何刁憋。如果未提供SRID滥嘴,則默認(rèn)為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—從一個(gè)(WKB)或擴(kuò)展(EWKB)創(chuàng)建一個(gè)?geography實(shí)例。
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創(chuàng)建geometry實(shí)例是尖。
ST_GeomFromWKB— Creates a geometry instance from a Well-Known Binary geometry representation (WKB) and optional SRID.
ST_LineFromWKB— 使用給定的SRID從WKB中構(gòu)建LINESTRING
ST_LineFromWKB— Makes a?LINESTRING?from WKB with the given SRID
ST_LinestringFromWKB—使用給定的SRID從WKB創(chuàng)建幾何。
ST_LinestringFromWKB— Makes a geometry from WKB with the given SRID.
ST_PointFromWKB—使用給定的SRID從WKB創(chuàng)建幾何
ST_PointFromWKB— Makes a geometry from WKB with the given SRID
ST_WKBToSQL—從眾所周知的二進(jìn)制表示形式(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(“微小的已知二進(jìn)制”)幾何圖形表示中創(chuàng)建幾何圖形實(shí)例。
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—從編碼折線創(chuàng)建LineString逸吵。
ST_LineFromEncodedPolyline— Creates a LineString from an Encoded Polyline.
ST_PointFromGeoHash—從GeoHash字符串返回一個(gè)點(diǎn)。
ST_PointFromGeoHash— Return a point from a GeoHash string.
Tips
1. create geometry objects from various textual or binary formats
Geometry Output(將?geometry objects 轉(zhuǎn)換為文本或者二進(jìn)制 或者其他)
ST_AsEWKT—返回帶有SRID元數(shù)據(jù)的幾何圖形的(WKT)表示形式缝裁。
ST_AsEWKT— Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
ST_AsText—返回不帶SRID元數(shù)據(jù)的幾何/地理的(WKT)表示形式扫皱。
ST_AsText— Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
ST_AsBinary—返回不包含SRID元數(shù)據(jù)的幾何/地理的(WKB)表示形式。
ST_AsBinary— Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
ST_AsEWKB—返回帶有SRID元數(shù)據(jù)的幾何的(WKB)表示形式捷绑。
ST_AsEWKB— Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.
ST_AsHEXEWKB—使用小尾數(shù)(NDR)或大尾數(shù)(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元素返回进苍。幾種變體。默認(rèn)版本= ??2鸭叙,默認(rèn)最大十進(jìn)制數(shù)字= 15
ST_AsKML— Return the geometry as a KML element. Several variants. Default version=2, default maxdecimaldigits=15
ST_AsLatLonText—返回給定點(diǎn)的度觉啊,分,秒表示递雀。
ST_AsLatLonText— Return the Degrees, Minutes, Seconds representation of the given point.
ST_AsMVTGeom—將幾何轉(zhuǎn)換為?Mapbox Vector Tile的坐標(biāo)空間柄延。
ST_AsMVTGeom— Transform a geometry into the coordinate space of a Mapbox Vector Tile.
ST_AsMVT—聚合函數(shù),返回一組行的Mapbox Vector Tile表示形式。
ST_AsMVT— Aggregate function returning a Mapbox Vector Tile representation of a set of rows.
ST_AsSVG—返回幾何的SVG路徑數(shù)據(jù)搜吧。
ST_AsSVG— Returns SVG path data for a geometry.
ST_AsTWKB—將幾何返回為TWKB市俊,又稱“微小已知二進(jìn)制”
ST_AsTWKB— Returns the geometry as TWKB, aka "Tiny Well-Known Binary"
ST_AsX3D—返回X3D xml節(jié)點(diǎn)元素格式的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(運(yùn)算符)
&&—返回TRUE A的2D邊界框是否與B的2D邊界框相交滤奈。
&&— Returns?TRUE?if A's 2D bounding box intersects B's 2D bounding box.
&&(geometry摆昧,box2df)-返回TRUE幾何的(緩存的)2D邊界框是否與2D浮點(diǎn)精度邊界框(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浮點(diǎn)精度邊界框(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兩個(gè)2D浮點(diǎn)精度邊界框(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浮點(diǎn)精度邊界框(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浮點(diǎn)精度邊界框(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兩個(gè)nD浮點(diǎn)精度邊界框(GIDX)是否相交似舵。
&&&(gidx,gidx)— Returns?TRUE?if two n-D float precision bounding boxes (GIDX) intersect each other.
&<—返回TRUE? A的邊界框是否重疊或位于B的左側(cè)。
&<— 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的右側(cè)砚哗。
&>— Returns?TRUE?if A' bounding box overlaps or is to the right of B's.
<<—返回TRUE A的邊界框是否嚴(yán)格位于B的左邊。
<<— Returns?TRUE?if A's bounding box is strictly to the left of B's.
<<|—?TRUE 如果A的邊界框嚴(yán)格低于B的邊界框砰奕,則返回蛛芥。
<<|— Returns?TRUE?if A's bounding box is strictly below B's.
=—返回TRUE 幾何/地理A的坐標(biāo)和坐標(biāo)順序是否與幾何B的坐標(biāo)和坐標(biāo)順序相同。
=— 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的邊界框是否嚴(yán)格位于B的右邊脆淹。
>>— Returns?TRUE?if A's bounding box is strictly to the right of B's.
@—返回TRUE A的邊界框是否包含在B的邊界框內(nèi)常空。
@— Returns?TRUE?if A's bounding box is contained by B's.
@(geometry,box2df)—返回TRUE 幾何的2D邊界框是否包含在2D浮點(diǎn)精度邊界框(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浮點(diǎn)精度邊界框(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一個(gè)2D浮點(diǎn)精度邊界框(BOX2DF)是否包含在另一個(gè)2D浮點(diǎn)精度邊界框中。
@(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的邊界框是否嚴(yán)格高于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浮點(diǎn)精度邊界框(GIDX)哮内。
~(geometry,box2df)— Returns?TRUE?if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).
?(box2df,geometry)-返回TRUE 2D浮點(diǎn)精度邊界框(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浮點(diǎn)精度邊界框(BOX2DF)是否包含另一個(gè)2D浮點(diǎn)精度邊界框(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軌跡之間最接近的點(diǎn)之間的距離瞭恰。
|=|— 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.