-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.txt
181 lines (168 loc) · 14 KB
/
examples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
7.10.1. Bounding Box Operators
&& — Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.
&&(geometry,box2df) — Returns TRUE if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF).
&&(box2df,geometry) — Returns TRUE if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box.
&&(box2df,box2df) — Returns TRUE if two 2D float precision bounding boxes (BOX2DF) intersect each other.
&&& — Returns TRUE if A's n-D bounding box intersects B's n-D bounding box.
&&&(geometry,gidx) — Returns TRUE if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX).
&&&(gidx,geometry) — Returns TRUE if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box.
&&&(gidx,gidx) — Returns TRUE if two n-D float precision bounding boxes (GIDX) intersect each other.
&< — Returns TRUE if A's bounding box overlaps or is to the left of B's.
&<| — Returns TRUE if A's bounding box overlaps or is below B's.
&> — Returns TRUE if A' bounding box overlaps or is to the right of B's.
<< — Returns TRUE if A's bounding box is strictly to the left of B's.
<<| — Returns TRUE if A's bounding box is strictly below B's.
= — Returns TRUE if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B.
>> — Returns TRUE if A's bounding box is strictly to the right of B's.
@ — Returns TRUE if A's bounding box is contained by B's.
@(geometry,box2df) — Returns TRUE if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF).
@(box2df,geometry) — Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box.
@(box2df,box2df) — Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box.
|&> — Returns TRUE if A's bounding box overlaps or is above B's.
|>> — Returns TRUE if A's bounding box is strictly above B's.
~ — Returns TRUE if A's bounding box contains B's.
~(geometry,box2df) — Returns TRUE if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).
~(box2df,geometry) — Returns TRUE if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box.
~(box2df,box2df) — Returns TRUE if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF).
~= — Returns TRUE if A's bounding box is the same as B's.
7.10.2. Distance Operators
<-> — Returns the 2D distance between A and B.
|=| — Returns the distance between A and B trajectories at their closest point of approach.
<#> — Returns the 2D distance between A and B bounding boxes.
<<->> — Returns the n-D distance between the centroids of A and B bounding boxes.
<<#>> — Returns the n-D distance between A and B bounding boxes.
ST_Azimuth — Returns the north-based azimuth of a line between two points.
ST_Angle — Returns the angle between two vectors defined by 3 or 4 points, or 2 lines.
ST_ClosestPoint — Returns the 2D point on g1 that is closest to g2. This is the first point of the shortest line from one geometry to the other.
ST_3DClosestPoint — Returns the 3D point on g1 that is closest to g2. This is the first point of the 3D shortest line.
ST_DistanceSphere — Returns minimum distance in meters between two lon/lat geometries using a spherical earth model.
ST_DistanceSpheroid — Returns the minimum distance between two lon/lat geometries using a spheroidal earth model.
ST_FrechetDistance — Returns the Fréchet distance between two geometries.
ST_HausdorffDistance — Returns the Hausdorff distance between two geometries.
ST_LongestLine — Returns the 2D longest line between two geometries.
ST_3DLongestLine — Returns the 3D longest line between two geometries
ST_MaxDistance — Returns the 2D largest distance between two geometries in projected units.
ST_3DMaxDistance — Returns the 3D cartesian maximum distance (based on spatial ref) between two geometries in projected units.
ST_MinimumClearance — Returns the minimum clearance of a geometry, a measure of a geometry's robustness.
ST_MinimumClearanceLine — Returns the two-point LineString spanning a geometry's minimum clearance.
ST_Perimeter — Returns the length of the boundary of a polygonal geometry or geography.
ST_Perimeter2D — Returns the 2D perimeter of a polygonal geometry. Alias for ST_Perimeter.
ST_3DPerimeter — Returns the 3D perimeter of a polygonal geometry.
ST_ShortestLine — Returns the 2D shortest line between two geometries
ST_3DShortestLine — Returns the 3D shortest line between two geometries
7.13. Overlay Functions
Abstract
These functions compute results arising from the overlay of two geometries. These are also known as point-set theoretic boolean operations. Some related functions are also provided.
ST_ClipByBox2D — Computes the portion of a geometry falling within a rectangle.
ST_MemUnion — Aggregate function which unions geometries in a memory-efficent but slower way
ST_Node — Nodes a collection of lines.
ST_Split — Returns a collection of geometries created by splitting a geometry by another geometry.
ST_Subdivide — Computes a rectilinear subdivision of a geometry.
ST_SymDifference — Computes a geometry representing the portions of geometries A and B that do not intersect.
7.14. Geometry Processing
Abstract
These functions compute geometric constructions, or alter geometry size or shape.
ST_BuildArea — Creates a polygonal geometry formed by the linework of a geometry.
ST_ChaikinSmoothing — Returns a smoothed version of a geometry, using the Chaikin algorithm
ST_DelaunayTriangles — Returns the Delaunay triangulation of the vertices of a geometry.
ST_FilterByM — Removes vertices based on their M value
ST_GeneratePoints — Generates random points contained in a Polygon or MultiPolygon.
ST_GeometricMedian — Returns the geometric median of a MultiPoint.
ST_LineMerge — Return the lines formed by sewing together a MultiLineString.
ST_MaximumInscribedCircle — Computes the largest circle contained within a geometry.
ST_LargestEmptyCircle — Computes the largest circle not overlapping a geometry.
ST_MinimumBoundingCircle — Returns the smallest circle polygon that contains a geometry.
ST_MinimumBoundingRadius — Returns the center point and radius of the smallest circle that contains a geometry.
ST_OrientedEnvelope — Returns a minimum-area rectangle containing a geometry.
ST_OffsetCurve — Returns an offset line at a given distance and side from an input line.
ST_PointOnSurface — Computes a point guaranteed to lie in a polygon, or on a geometry.
ST_Polygonize — Computes a collection of polygons formed from the linework of a set of geometries.
ST_ReducePrecision — Returns a valid geometry with points rounded to a grid tolerance.
ST_SharedPaths — Returns a collection containing paths shared by the two input linestrings/multilinestrings.
ST_SimplifyPreserveTopology — Returns a simplified and valid version of a geometry, using the Douglas-Peucker algorithm.
ST_SimplifyPolygonHull — Computes a simplifed topology-preserving outer or inner hull of a polygonal geometry.
ST_SimplifyVW — Returns a simplified version of a geometry, using the Visvalingam-Whyatt algorithm
ST_SetEffectiveArea — Sets the effective area for each vertex, using the Visvalingam-Whyatt algorithm.
ST_TriangulatePolygon — Computes the constrained Delaunay triangulation of polygons
ST_VoronoiLines — Returns the boundaries of the Voronoi diagram of the vertices of a geometry.
ST_VoronoiPolygons — Returns the cells of the Voronoi diagram of the vertices of a geometry.
7.15. Coverages
Abstract
These functions operate on sets of polygonal geometry that form "implicit coverages". To form a valid coverage polygons must not overlap, and the vertices of adjacent edges must match exactly. Coverages are fast to process, and can be operated on with window functions, which retain the coverage topology inside the window partition while altering the edges.
ST_CoverageInvalidEdges — Window function that finds locations where polygons fail to form a valid coverage.
ST_CoverageSimplify — Window function that simplifies the edges of a polygonal coverage.
ST_CoverageUnion — Computes the union of a set of polygons forming a coverage by removing shared edges.
7.16. Affine Transformations
Abstract
These functions change the position and shape of geometries using affine transformations.
ST_Affine — Apply a 3D affine transformation to a geometry.
ST_Rotate — Rotates a geometry about an origin point.
ST_RotateX — Rotates a geometry about the X axis.
ST_RotateY — Rotates a geometry about the Y axis.
ST_RotateZ — Rotates a geometry about the Z axis.
ST_Scale — Scales a geometry by given factors.
ST_Translate — Translates a geometry by given offsets.
ST_TransScale — Translates and scales a geometry by given offsets and factors.
7.17. Clustering Functions
Abstract
These functions implement clustering algorithms for sets of geometries.
ST_ClusterDBSCAN — Window function that returns a cluster id for each input geometry using the DBSCAN algorithm.
ST_ClusterIntersecting — Aggregate function that clusters input geometries into connected sets.
ST_ClusterIntersectingWin — Window function that returns a cluster id for each input geometry, clustering input geometries into connected sets.
ST_ClusterKMeans — Window function that returns a cluster id for each input geometry using the K-means algorithm.
ST_ClusterWithin — Aggregate function that clusters geometries by separation distance.
ST_ClusterWithinWin — Window function that returns a cluster id for each input geometry, clustering using separation distance.
7.18. Bounding Box Functions
Abstract
These functions produce or operate on bounding boxes. They can also provide and accept geometry values, by using automatic or explicit casts.
See also Section 12.7, “PostGIS Box Functions”.
Box2D — Returns a BOX2D representing the 2D extent of a geometry.
Box3D — Returns a BOX3D representing the 3D extent of a geometry.
ST_EstimatedExtent — Returns the estimated extent of a spatial table.
ST_Expand — Returns a bounding box expanded from another bounding box or a geometry.
ST_Extent — Aggregate function that returns the bounding box of geometries.
ST_3DExtent — Aggregate function that returns the 3D bounding box of geometries.
ST_MakeBox2D — Creates a BOX2D defined by two 2D point geometries.
ST_3DMakeBox — Creates a BOX3D defined by two 3D point geometries.
ST_XMax — Returns the X maxima of a 2D or 3D bounding box or a geometry.
ST_XMin — Returns the X minima of a 2D or 3D bounding box or a geometry.
ST_YMax — Returns the Y maxima of a 2D or 3D bounding box or a geometry.
ST_YMin — Returns the Y minima of a 2D or 3D bounding box or a geometry.
ST_ZMax — Returns the Z maxima of a 2D or 3D bounding box or a geometry.
ST_ZMin — Returns the Z minima of a 2D or 3D bounding box or a geometry.
7.19. Linear Referencing
ST_LineInterpolatePoint — Returns a point interpolated along a line at a fractional location.
ST_3DLineInterpolatePoint — Returns a point interpolated along a 3D line at a fractional location.
ST_LineInterpolatePoints — Returns points interpolated along a line at a fractional interval.
ST_LineLocatePoint — Returns the fractional location of the closest point on a line to a point.
ST_LineSubstring — Returns the part of a line between two fractional locations.
ST_LocateAlong — Returns the point(s) on a geometry that match a measure value.
ST_LocateBetween — Returns the portions of a geometry that match a measure range.
ST_LocateBetweenElevations — Returns the portions of a geometry that lie in an elevation (Z) range.
ST_InterpolatePoint — Returns the interpolated measure of a geometry closest to a point.
ST_AddMeasure — Interpolates measures along a linear geometry.
7.20. Trajectory Functions
Abstract
These functions support working with trajectories. A trajectory is a linear geometry with increasing measures (M value) on each coordinate. Spatio-temporal data can be modeled by using relative times (such as the epoch) as the measure values.
ST_IsValidTrajectory — Tests if the geometry is a valid trajectory.
ST_ClosestPointOfApproach — Returns a measure at the closest point of approach of two trajectories.
ST_DistanceCPA — Returns the distance between the closest point of approach of two trajectories.
ST_CPAWithin — Tests if the closest point of approach of two trajectories is within the specified distance.
7.21. SFCGAL Functions
Abstract
SFCGAL is a C++ wrapper library around CGAL that provides advanced 2D and 3D spatial functions. For robustness, geometry coordinates have an exact rational number representation.
Installation instructions for the library can be found on the SFCGAL home page (http://www.sfcgal.org). To enable the functions use create extension postgis_sfcgal.
ST_AlphaShape — Computes an Alpha-shape enclosing a geometry
ST_ApproximateMedialAxis — Compute the approximate medial axis of an areal geometry.
ST_ConstrainedDelaunayTriangles — Return a constrained Delaunay triangulation around the given input geometry.
ST_Extrude — Extrude a surface to a related volume
ST_ForceLHR — Force LHR orientation
ST_IsPlanar — Check if a surface is or not planar
ST_IsSolid — Test if the geometry is a solid. No validity check is performed.
ST_MakeSolid — Cast the geometry into a solid. No check is performed. To obtain a valid solid, the input geometry must be a closed Polyhedral Surface or a closed TIN.
ST_MinkowskiSum — Performs Minkowski sum
ST_OptimalAlphaShape — Computes an Alpha-shape enclosing a geometry using an "optimal" alpha value.
ST_Orientation — Determine surface orientation
ST_StraightSkeleton — Compute a straight skeleton from a geometry
ST_Tesselate — Perform surface Tesselation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
ST_Volume — Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.