GeoAlchemy2 0.17.0__py3-none-any.whl → 0.18.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- geoalchemy2/__init__.py +4 -24
- geoalchemy2/_functions.py +175 -158
- geoalchemy2/_functions_helpers.py +4 -2
- geoalchemy2/admin/dialects/common.py +22 -0
- geoalchemy2/admin/dialects/geopackage.py +36 -0
- geoalchemy2/admin/dialects/mariadb.py +27 -26
- geoalchemy2/admin/dialects/mysql.py +36 -8
- geoalchemy2/admin/dialects/postgresql.py +101 -31
- geoalchemy2/admin/dialects/sqlite.py +74 -5
- geoalchemy2/alembic_helpers.py +1 -0
- geoalchemy2/comparator.py +4 -4
- geoalchemy2/elements.py +72 -7
- geoalchemy2/functions.py +3 -2
- geoalchemy2/functions.pyi +669 -2
- geoalchemy2/types/__init__.py +54 -36
- geoalchemy2/types/dialects/mariadb.py +17 -2
- geoalchemy2/types/dialects/mysql.py +2 -2
- {GeoAlchemy2-0.17.0.dist-info → geoalchemy2-0.18.0.dist-info}/METADATA +5 -6
- geoalchemy2-0.18.0.dist-info/RECORD +35 -0
- {GeoAlchemy2-0.17.0.dist-info → geoalchemy2-0.18.0.dist-info}/WHEEL +1 -1
- GeoAlchemy2-0.17.0.dist-info/RECORD +0 -35
- {GeoAlchemy2-0.17.0.dist-info → geoalchemy2-0.18.0.dist-info}/entry_points.txt +0 -0
- {GeoAlchemy2-0.17.0.dist-info → geoalchemy2-0.18.0.dist-info/licenses}/COPYING.rst +0 -0
- {GeoAlchemy2-0.17.0.dist-info → geoalchemy2-0.18.0.dist-info}/top_level.txt +0 -0
geoalchemy2/_functions.py
CHANGED
@@ -5,6 +5,17 @@ from typing import Optional
|
|
5
5
|
from typing import Tuple
|
6
6
|
from typing import Union
|
7
7
|
|
8
|
+
from sqlalchemy.sql.sqltypes import Boolean
|
9
|
+
from sqlalchemy.sql.sqltypes import Float
|
10
|
+
from sqlalchemy.sql.sqltypes import Integer
|
11
|
+
from sqlalchemy.sql.sqltypes import LargeBinary
|
12
|
+
from sqlalchemy.sql.sqltypes import String
|
13
|
+
|
14
|
+
try:
|
15
|
+
from sqlalchemy.sql.sqltypes import Double
|
16
|
+
except ImportError:
|
17
|
+
Double = Float # type: ignore [misc,assignment]
|
18
|
+
|
8
19
|
from geoalchemy2 import types
|
9
20
|
|
10
21
|
# fmt: off
|
@@ -15,7 +26,7 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
15
26
|
'''Removes a geometry column from a spatial table.'''),
|
16
27
|
('DropGeometryTable', None,
|
17
28
|
'''Drops a table and all its references in geometry_columns.'''),
|
18
|
-
('Find_SRID',
|
29
|
+
('Find_SRID', Integer,
|
19
30
|
'''Returns the SRID defined for a geometry column.'''),
|
20
31
|
('Populate_Geometry_Columns', None,
|
21
32
|
'''Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints.'''),
|
@@ -41,13 +52,13 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
41
52
|
'''[geometry] Creates a Polygon from a LineString with a specified SRID.\nOR\n[raster] Returns a multipolygon geometry formed by the union of pixels that have a pixel value that is not no data value. If no band number is specified, band num defaults to 1.'''),
|
42
53
|
('ST_TileEnvelope', types.Geometry,
|
43
54
|
'''Creates a rectangular Polygon in Web Mercator (SRID:3857) using the XYZ tile system.'''),
|
44
|
-
('GeometryType',
|
55
|
+
('GeometryType', String,
|
45
56
|
'''Returns the type of a geometry as text.'''),
|
46
57
|
('ST_Boundary', types.Geometry,
|
47
58
|
'''Returns the boundary of a geometry.'''),
|
48
|
-
('ST_CoordDim',
|
59
|
+
('ST_CoordDim', Integer,
|
49
60
|
'''Return the coordinate dimension of a geometry.'''),
|
50
|
-
('ST_Dimension',
|
61
|
+
('ST_Dimension', Integer,
|
51
62
|
'''Returns the topological dimension of a geometry.'''),
|
52
63
|
('ST_Dump', types.GeometryDump,
|
53
64
|
'''Returns a set of geometry_dump rows for the components of a geometry.'''),
|
@@ -65,45 +76,45 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
65
76
|
'''Returns a LineString representing the exterior ring of a Polygon.'''),
|
66
77
|
('ST_GeometryN', types.Geometry,
|
67
78
|
'''Return the Nth geometry element of a geometry collection.'''),
|
68
|
-
('ST_GeometryType',
|
79
|
+
('ST_GeometryType', String,
|
69
80
|
'''Returns the SQL-MM type of a geometry as text.'''),
|
70
|
-
('ST_HasArc',
|
81
|
+
('ST_HasArc', Boolean,
|
71
82
|
'''Tests if a geometry contains a circular arc'''),
|
72
83
|
('ST_InteriorRingN', types.Geometry,
|
73
84
|
'''Returns the Nth interior ring (hole) of a Polygon.'''),
|
74
|
-
('ST_IsPolygonCCW',
|
85
|
+
('ST_IsPolygonCCW', Boolean,
|
75
86
|
'''Tests if Polygons have exterior rings oriented counter-clockwise and interior rings oriented clockwise.'''),
|
76
|
-
('ST_IsPolygonCW',
|
87
|
+
('ST_IsPolygonCW', Boolean,
|
77
88
|
'''Tests if Polygons have exterior rings oriented clockwise and interior rings oriented counter-clockwise.'''),
|
78
|
-
('ST_IsClosed',
|
89
|
+
('ST_IsClosed', Boolean,
|
79
90
|
'''Tests if a LineStrings's start and end points are coincident. For a PolyhedralSurface tests if it is closed (volumetric).'''),
|
80
|
-
('ST_IsCollection',
|
91
|
+
('ST_IsCollection', Boolean,
|
81
92
|
'''Tests if a geometry is a geometry collection type.'''),
|
82
|
-
('ST_IsEmpty',
|
93
|
+
('ST_IsEmpty', Boolean,
|
83
94
|
'''[geometry] Tests if a geometry is empty.\nOR\n[raster] Returns true if the raster is empty (width = 0 and height = 0). Otherwise, returns false.'''),
|
84
|
-
('ST_IsRing',
|
95
|
+
('ST_IsRing', Boolean,
|
85
96
|
'''Tests if a LineString is closed and simple.'''),
|
86
|
-
('ST_IsSimple',
|
97
|
+
('ST_IsSimple', Boolean,
|
87
98
|
'''Tests if a geometry has no points of self-intersection or self-tangency.'''),
|
88
|
-
('ST_M',
|
99
|
+
('ST_M', Float,
|
89
100
|
'''Returns the M coordinate of a Point.'''),
|
90
|
-
('ST_MemSize',
|
101
|
+
('ST_MemSize', Integer,
|
91
102
|
'''[geometry] Returns the amount of memory space a geometry takes.\nOR\n[raster] Returns the amount of space (in bytes) the raster takes.'''),
|
92
|
-
('ST_NDims',
|
103
|
+
('ST_NDims', Integer,
|
93
104
|
'''Returns the coordinate dimension of a geometry.'''),
|
94
|
-
('ST_NPoints',
|
105
|
+
('ST_NPoints', Integer,
|
95
106
|
'''Returns the number of points (vertices) in a geometry.'''),
|
96
|
-
('ST_NRings',
|
107
|
+
('ST_NRings', Integer,
|
97
108
|
'''Returns the number of rings in a polygonal geometry.'''),
|
98
|
-
('ST_NumGeometries',
|
109
|
+
('ST_NumGeometries', Integer,
|
99
110
|
'''Returns the number of elements in a geometry collection.'''),
|
100
|
-
('ST_NumInteriorRings',
|
111
|
+
('ST_NumInteriorRings', Integer,
|
101
112
|
'''Returns the number of interior rings (holes) of a Polygon.'''),
|
102
|
-
('ST_NumInteriorRing',
|
113
|
+
('ST_NumInteriorRing', Integer,
|
103
114
|
'''Returns the number of interior rings (holes) of a Polygon. Aias for ST_NumInteriorRings'''),
|
104
|
-
('ST_NumPatches',
|
115
|
+
('ST_NumPatches', Integer,
|
105
116
|
'''Return the number of faces on a Polyhedral Surface. Will return null for non-polyhedral geometries.'''),
|
106
|
-
('ST_NumPoints',
|
117
|
+
('ST_NumPoints', Integer,
|
107
118
|
'''Returns the number of points in a LineString or CircularString.'''),
|
108
119
|
('ST_PatchN', types.Geometry,
|
109
120
|
'''Returns the Nth geometry (face) of a PolyhedralSurface.'''),
|
@@ -113,15 +124,15 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
113
124
|
'''Returns a MultiPoint containing all the coordinates of a geometry.'''),
|
114
125
|
('ST_StartPoint', types.Geometry,
|
115
126
|
'''Returns the first point of a LineString.'''),
|
116
|
-
('ST_Summary',
|
127
|
+
('ST_Summary', String,
|
117
128
|
'''[geometry] Returns a text summary of the contents of a geometry.\nOR\n[raster] Returns a text summary of the contents of the raster.'''),
|
118
|
-
('ST_X',
|
129
|
+
('ST_X', Float,
|
119
130
|
'''Returns the X coordinate of a Point.'''),
|
120
|
-
('ST_Y',
|
131
|
+
('ST_Y', Float,
|
121
132
|
'''Returns the Y coordinate of a Point.'''),
|
122
|
-
('ST_Z',
|
133
|
+
('ST_Z', Float,
|
123
134
|
'''Returns the Z coordinate of a Point.'''),
|
124
|
-
('ST_Zmflag',
|
135
|
+
('ST_Zmflag', Integer,
|
125
136
|
'''Returns a code indicating the ZM coordinate dimension of a geometry.'''),
|
126
137
|
('ST_AddPoint', types.Geometry,
|
127
138
|
'''Add a point to a LineString.'''),
|
@@ -173,15 +184,15 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
173
184
|
'''Snap segments and vertices of input geometry to vertices of a reference geometry.'''),
|
174
185
|
('ST_SwapOrdinates', types.Geometry,
|
175
186
|
'''Returns a version of the given geometry with given ordinate values swapped.'''),
|
176
|
-
('ST_IsValid',
|
187
|
+
('ST_IsValid', Boolean,
|
177
188
|
'''Tests if a geometry is well-formed in 2D.'''),
|
178
189
|
('ST_IsValidDetail', None,
|
179
190
|
'''Returns a valid_detail row stating if a geometry is valid, and if not a reason why and a location.'''),
|
180
|
-
('ST_IsValidReason',
|
191
|
+
('ST_IsValidReason', String,
|
181
192
|
'''Returns text stating if a geometry is valid, or a reason for invalidity.'''),
|
182
193
|
('ST_SetSRID', types.Geometry,
|
183
194
|
'''[geometry] Set the SRID on a geometry to a particular integer value.\nOR\n[raster] Sets the SRID of a raster to a particular integer srid defined in the spatial_ref_sys table.'''),
|
184
|
-
('ST_SRID',
|
195
|
+
('ST_SRID', Integer,
|
185
196
|
'''[geometry] Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table.\nOR\n[raster] Returns the spatial reference identifier of the raster as defined in spatial_ref_sys table.'''),
|
186
197
|
('ST_Transform', types.Geometry,
|
187
198
|
'''[geometry] Return a new geometry with its coordinates transformed to a different spatial reference system.\nOR\n[raster] Reprojects a raster in a known spatial reference system to another known spatial reference system using specified resampling algorithm. Options are NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to NearestNeighbor.'''),
|
@@ -247,25 +258,25 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
247
258
|
'''Creates a LineString from an Encoded Polyline.'''),
|
248
259
|
('ST_PointFromGeoHash', types.Geometry,
|
249
260
|
'''Return a point from a GeoHash string.'''),
|
250
|
-
('ST_AsEWKT',
|
261
|
+
('ST_AsEWKT', String,
|
251
262
|
'''Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.'''),
|
252
|
-
('ST_AsText',
|
263
|
+
('ST_AsText', String,
|
253
264
|
'''Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.'''),
|
254
265
|
('ST_AsBinary', None,
|
255
266
|
'''[geometry] Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.\nOR\n[raster] Return the Well-Known Binary (WKB) representation of the raster.'''),
|
256
267
|
('ST_AsEWKB', None,
|
257
268
|
'''Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.'''),
|
258
|
-
('ST_AsHEXEWKB',
|
269
|
+
('ST_AsHEXEWKB', String,
|
259
270
|
'''Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.'''),
|
260
|
-
('ST_AsEncodedPolyline',
|
271
|
+
('ST_AsEncodedPolyline', String,
|
261
272
|
'''Returns an Encoded Polyline from a LineString geometry.'''),
|
262
273
|
('ST_AsGeobuf', None,
|
263
274
|
'''Return a Geobuf representation of a set of rows.'''),
|
264
|
-
('ST_AsGML',
|
275
|
+
('ST_AsGML', String,
|
265
276
|
'''Return the geometry as a GML version 2 or 3 element.'''),
|
266
|
-
('ST_AsKML',
|
277
|
+
('ST_AsKML', String,
|
267
278
|
'''Return the geometry as a KML element. Several variants. Default version=2, default maxdecimaldigits=15'''),
|
268
|
-
('ST_AsLatLonText',
|
279
|
+
('ST_AsLatLonText', String,
|
269
280
|
'''Return the Degrees, Minutes, Seconds representation of the given point.'''),
|
270
281
|
('ST_AsMVTGeom', types.Geometry,
|
271
282
|
'''Transform a geometry into the coordinate space of a Mapbox Vector Tile.'''),
|
@@ -277,97 +288,97 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
277
288
|
'''Returns the geometry as TWKB, aka \"Tiny Well-Known Binary\"'''),
|
278
289
|
('ST_AsX3D', None,
|
279
290
|
'''Returns a Geometry in X3D xml node element format: ISO-IEC-19776-1.2-X3DEncodings-XML'''),
|
280
|
-
('ST_GeoHash',
|
291
|
+
('ST_GeoHash', String,
|
281
292
|
'''Return a GeoHash representation of the geometry.'''),
|
282
|
-
('ST_3DIntersects',
|
293
|
+
('ST_3DIntersects', Boolean,
|
283
294
|
'''Returns TRUE if the Geometries \"spatially intersect\" in 3D - only for points, linestrings, polygons, polyhedral surface (area).'''),
|
284
|
-
('ST_Contains',
|
295
|
+
('ST_Contains', Boolean,
|
285
296
|
'''[geometry] Returns true if and only if no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A.\nOR\n[raster] Return true if no points of raster rastB lie in the exterior of raster rastA and at least one point of the interior of rastB lies in the interior of rastA.'''),
|
286
|
-
('ST_ContainsProperly',
|
297
|
+
('ST_ContainsProperly', Boolean,
|
287
298
|
'''[geometry] Returns true if B intersects the interior of A but not the boundary (or exterior). A does not contain properly itself, but does contain itself.\nOR\n[raster] Return true if rastB intersects the interior of rastA but not the boundary or exterior of rastA.'''),
|
288
|
-
('ST_Covers',
|
299
|
+
('ST_Covers', Boolean,
|
289
300
|
'''[geometry] Returns 1 (TRUE) if no point in Geometry B is outside Geometry A\nOR\n[raster] Return true if no points of raster rastB lie outside raster rastA.'''),
|
290
|
-
('ST_CoveredBy',
|
301
|
+
('ST_CoveredBy', Boolean,
|
291
302
|
'''[geometry] Returns 1 (TRUE) if no point in Geometry/Geography A is outside Geometry/Geography B\nOR\n[raster] Return true if no points of raster rastA lie outside raster rastB.'''),
|
292
|
-
('ST_Crosses',
|
303
|
+
('ST_Crosses', Boolean,
|
293
304
|
'''Returns TRUE if the supplied geometries have some, but not all, interior points in common.'''),
|
294
|
-
('ST_LineCrossingDirection',
|
305
|
+
('ST_LineCrossingDirection', Integer,
|
295
306
|
'''Given 2 linestrings, returns a number between -3 and 3 denoting what kind of crossing behavior. 0 is no crossing.'''),
|
296
|
-
('ST_Disjoint',
|
307
|
+
('ST_Disjoint', Boolean,
|
297
308
|
'''[geometry] Returns TRUE if the Geometries do not \"spatially intersect\" - if they do not share any space together.\nOR\n[raster] Return true if raster rastA does not spatially intersect rastB.'''),
|
298
|
-
('ST_Equals',
|
309
|
+
('ST_Equals', Boolean,
|
299
310
|
'''Returns true if the given geometries represent the same geometry. Directionality is ignored.'''),
|
300
|
-
('ST_Intersects',
|
311
|
+
('ST_Intersects', Boolean,
|
301
312
|
'''[geometry] Returns TRUE if the Geometries/Geography \"spatially intersect in 2D\" - (share any portion of space) and FALSE if they don't (they are Disjoint). For geography tolerance is 0.00001 meters (so any points that close are considered to intersect)\nOR\n[raster] Return true if raster rastA spatially intersects raster rastB.'''),
|
302
|
-
('ST_OrderingEquals',
|
313
|
+
('ST_OrderingEquals', Boolean,
|
303
314
|
'''Returns true if the given geometries represent the same geometry and points are in the same directional order.'''),
|
304
|
-
('ST_Overlaps',
|
315
|
+
('ST_Overlaps', Boolean,
|
305
316
|
'''[geometry] Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other.\nOR\n[raster] Return true if raster rastA and rastB intersect but one does not completely contain the other.'''),
|
306
|
-
('ST_PointInsideCircle',
|
317
|
+
('ST_PointInsideCircle', Boolean,
|
307
318
|
'''Is the point geometry inside the circle defined by center_x, center_y, radius'''),
|
308
|
-
('ST_Relate',
|
319
|
+
('ST_Relate', Boolean,
|
309
320
|
'''Returns true if this Geometry is spatially related to anotherGeometry, by testing for intersections between the Interior, Boundary and Exterior of the two geometries as specified by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.'''),
|
310
|
-
('ST_RelateMatch',
|
321
|
+
('ST_RelateMatch', Boolean,
|
311
322
|
'''Returns true if intersectionMattrixPattern1 implies intersectionMatrixPattern2'''),
|
312
|
-
('ST_Touches',
|
323
|
+
('ST_Touches', Boolean,
|
313
324
|
'''[geometry] Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect.\nOR\n[raster] Return true if raster rastA and rastB have at least one point in common but their interiors do not intersect.'''),
|
314
|
-
('ST_Within',
|
325
|
+
('ST_Within', Boolean,
|
315
326
|
'''[geometry] Returns true if the geometry A is completely inside geometry B\nOR\n[raster] Return true if no points of raster rastA lie in the exterior of raster rastB and at least one point of the interior of rastA lies in the interior of rastB.'''),
|
316
|
-
('ST_3DDWithin',
|
327
|
+
('ST_3DDWithin', Boolean,
|
317
328
|
'''For 3d (z) geometry type Returns true if two geometries 3d distance is within number of units.'''),
|
318
|
-
('ST_3DDFullyWithin',
|
329
|
+
('ST_3DDFullyWithin', Boolean,
|
319
330
|
'''Returns true if all of the 3D geometries are within the specified distance of one another.'''),
|
320
|
-
('ST_DFullyWithin',
|
331
|
+
('ST_DFullyWithin', Boolean,
|
321
332
|
'''[geometry] Returns true if all of the geometries are within the specified distance of one another\nOR\n[raster] Return true if rasters rastA and rastB are fully within the specified distance of each other.'''),
|
322
|
-
('ST_DWithin',
|
333
|
+
('ST_DWithin', Boolean,
|
323
334
|
'''[geometry] Returns true if the geometries are within the specified distance of one another. For geometry units are in those of spatial reference and for geography units are in meters and measurement is defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.\nOR\n[raster] Return true if rasters rastA and rastB are within the specified distance of each other.'''),
|
324
|
-
('ST_Area',
|
335
|
+
('ST_Area', Float,
|
325
336
|
'''Returns the area of a polygonal geometry.'''),
|
326
|
-
('ST_Azimuth',
|
337
|
+
('ST_Azimuth', Float,
|
327
338
|
'''Returns the north-based azimuth as the angle in radians measured clockwise from the vertical on pointA to pointB.'''),
|
328
|
-
('ST_Angle',
|
339
|
+
('ST_Angle', Float,
|
329
340
|
'''Returns the angle between 3 points, or between 2 vectors (4 points or 2 lines).'''),
|
330
341
|
('ST_ClosestPoint', types.Geometry,
|
331
342
|
'''Returns the 2D point on g1 that is closest to g2. This is the first point of the shortest line.'''),
|
332
343
|
('ST_3DClosestPoint', types.Geometry,
|
333
344
|
'''Returns the 3D point on g1 that is closest to g2. This is the first point of the 3D shortest line.'''),
|
334
|
-
('ST_Distance',
|
345
|
+
('ST_Distance', Float,
|
335
346
|
'''Returns the distance between two geometry or geography values.'''),
|
336
|
-
('ST_3DDistance',
|
347
|
+
('ST_3DDistance', Float,
|
337
348
|
'''Returns the 3D cartesian minimum distance (based on spatial ref) between two geometries in projected units.'''),
|
338
|
-
('ST_DistanceSphere',
|
349
|
+
('ST_DistanceSphere', Float,
|
339
350
|
'''Returns minimum distance in meters between two lon/lat geometries using a spherical earth model.'''),
|
340
|
-
('ST_DistanceSpheroid',
|
351
|
+
('ST_DistanceSpheroid', Float,
|
341
352
|
'''Returns the minimum distance between two lon/lat geometries using a spheroidal earth model.'''),
|
342
|
-
('ST_FrechetDistance',
|
353
|
+
('ST_FrechetDistance', Float,
|
343
354
|
'''Returns the Fréchet distance between two geometries.'''),
|
344
|
-
('ST_HausdorffDistance',
|
355
|
+
('ST_HausdorffDistance', Float,
|
345
356
|
'''Returns the Hausdorff distance between two geometries.'''),
|
346
|
-
('ST_Length',
|
357
|
+
('ST_Length', Float,
|
347
358
|
'''Returns the 2D length of a linear geometry.'''),
|
348
|
-
('ST_Length2D',
|
359
|
+
('ST_Length2D', Float,
|
349
360
|
'''Returns the 2D length of a linear geometry. Alias for ST_Length'''),
|
350
|
-
('ST_3DLength',
|
361
|
+
('ST_3DLength', Float,
|
351
362
|
'''Returns the 3D length of a linear geometry.'''),
|
352
|
-
('ST_LengthSpheroid',
|
363
|
+
('ST_LengthSpheroid', Float,
|
353
364
|
'''Returns the 2D or 3D length/perimeter of a lon/lat geometry on a spheroid.'''),
|
354
365
|
('ST_LongestLine', types.Geometry,
|
355
366
|
'''Returns the 2D longest line between two geometries.'''),
|
356
367
|
('ST_3DLongestLine', types.Geometry,
|
357
368
|
'''Returns the 3D longest line between two geometries'''),
|
358
|
-
('ST_MaxDistance',
|
369
|
+
('ST_MaxDistance', Float,
|
359
370
|
'''Returns the 2D largest distance between two geometries in projected units.'''),
|
360
|
-
('ST_3DMaxDistance',
|
371
|
+
('ST_3DMaxDistance', Float,
|
361
372
|
'''Returns the 3D cartesian maximum distance (based on spatial ref) between two geometries in projected units.'''),
|
362
|
-
('ST_MinimumClearance',
|
373
|
+
('ST_MinimumClearance', Float,
|
363
374
|
'''Returns the minimum clearance of a geometry, a measure of a geometry's robustness.'''),
|
364
375
|
('ST_MinimumClearanceLine', types.Geometry,
|
365
376
|
'''Returns the two-point LineString spanning a geometry's minimum clearance.'''),
|
366
|
-
('ST_Perimeter',
|
377
|
+
('ST_Perimeter', Float,
|
367
378
|
'''Returns the length of the boundary of a polygonal geometry or geography.'''),
|
368
|
-
('ST_Perimeter2D',
|
379
|
+
('ST_Perimeter2D', Float,
|
369
380
|
'''Returns the 2D perimeter of a polygonal geometry. Alias for ST_Perimeter.'''),
|
370
|
-
('ST_3DPerimeter',
|
381
|
+
('ST_3DPerimeter', Float,
|
371
382
|
'''Returns the 3D perimeter of a polygonal geometry.'''),
|
372
383
|
('ST_Project', types.Geography,
|
373
384
|
'''Returns a point projected from a start point by a distance and bearing (azimuth).'''),
|
@@ -471,11 +482,11 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
471
482
|
'''Translates a geometry by given offsets.'''),
|
472
483
|
('ST_TransScale', types.Geometry,
|
473
484
|
'''Translates and scales a geometry by given offsets and factors.'''),
|
474
|
-
('ST_ClusterDBSCAN',
|
485
|
+
('ST_ClusterDBSCAN', Integer,
|
475
486
|
'''Window function that returns a cluster id for each input geometry using the DBSCAN algorithm.'''),
|
476
487
|
('ST_ClusterIntersecting', types.Geometry,
|
477
488
|
'''Aggregate function that clusters the input geometries into connected sets.'''),
|
478
|
-
('ST_ClusterKMeans',
|
489
|
+
('ST_ClusterKMeans', Integer,
|
479
490
|
'''Window function that returns a cluster id for each input geometry using the K-means algorithm.'''),
|
480
491
|
('ST_ClusterWithin', types.Geometry,
|
481
492
|
'''Aggregate function that clusters the input geometries by separation distance.'''),
|
@@ -495,17 +506,17 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
495
506
|
'''Creates a BOX2D defined by two 2D point geometries.'''),
|
496
507
|
('ST_3DMakeBox', None, # return an unsupported Box3d object
|
497
508
|
'''Creates a BOX3D defined by two 3D point geometries.'''),
|
498
|
-
('ST_XMax',
|
509
|
+
('ST_XMax', Float,
|
499
510
|
'''Returns the X maxima of a 2D or 3D bounding box or a geometry.'''),
|
500
|
-
('ST_XMin',
|
511
|
+
('ST_XMin', Float,
|
501
512
|
'''Returns the X minima of a 2D or 3D bounding box or a geometry.'''),
|
502
|
-
('ST_YMax',
|
513
|
+
('ST_YMax', Float,
|
503
514
|
'''Returns the Y maxima of a 2D or 3D bounding box or a geometry.'''),
|
504
|
-
('ST_YMin',
|
515
|
+
('ST_YMin', Float,
|
505
516
|
'''Returns the Y minima of a 2D or 3D bounding box or a geometry.'''),
|
506
|
-
('ST_ZMax',
|
517
|
+
('ST_ZMax', Float,
|
507
518
|
'''Returns the Z maxima of a 2D or 3D bounding box or a geometry.'''),
|
508
|
-
('ST_ZMin',
|
519
|
+
('ST_ZMin', Float,
|
509
520
|
'''Returns the Z minima of a 2D or 3D bounding box or a geometry.'''),
|
510
521
|
('ST_LineInterpolatePoint', types.Geometry,
|
511
522
|
'''Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 representing fraction of total length of linestring the point has to be located.'''),
|
@@ -513,7 +524,7 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
513
524
|
'''Returns a point interpolated along a line in 3D. Second argument is a float8 between 0 and 1 representing fraction of total length of linestring the point has to be located.'''),
|
514
525
|
('ST_LineInterpolatePoints', types.Geometry,
|
515
526
|
'''Returns one or more points interpolated along a line.'''),
|
516
|
-
('ST_LineLocatePoint',
|
527
|
+
('ST_LineLocatePoint', Float,
|
517
528
|
'''Returns a float between 0 and 1 representing the location of the closest point on LineString to the given Point, as a fraction of total 2d line length.'''),
|
518
529
|
('ST_LineSubstring', types.Geometry,
|
519
530
|
'''Return a linestring being a substring of the input one starting and ending at the given fractions of total 2d length. Second and third arguments are float8 values between 0 and 1.'''),
|
@@ -523,19 +534,19 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
523
534
|
'''Return a derived geometry collection value with elements that match the specified range of measures inclusively.'''),
|
524
535
|
('ST_LocateBetweenElevations', types.Geometry,
|
525
536
|
'''Return a derived geometry (collection) value with elements that intersect the specified range of elevations inclusively.'''),
|
526
|
-
('ST_InterpolatePoint',
|
537
|
+
('ST_InterpolatePoint', Float,
|
527
538
|
'''Return the value of the measure dimension of a geometry at the point closed to the provided point.'''),
|
528
539
|
('ST_AddMeasure', types.Geometry,
|
529
540
|
'''Return a derived geometry with measure elements linearly interpolated between the start and end points.'''),
|
530
|
-
('ST_IsValidTrajectory',
|
541
|
+
('ST_IsValidTrajectory', Boolean,
|
531
542
|
'''Returns true if the geometry is a valid trajectory.'''),
|
532
|
-
('ST_ClosestPointOfApproach',
|
543
|
+
('ST_ClosestPointOfApproach', Float,
|
533
544
|
'''Returns the measure at which points interpolated along two trajectories are closest.'''),
|
534
|
-
('ST_DistanceCPA',
|
545
|
+
('ST_DistanceCPA', Float,
|
535
546
|
'''Returns the distance between the closest point of approach of two trajectories.'''),
|
536
|
-
('ST_CPAWithin',
|
547
|
+
('ST_CPAWithin', Boolean,
|
537
548
|
'''Returns true if the closest point of approach of two trajectories is within the specified distance.'''),
|
538
|
-
('postgis_sfcgal_version',
|
549
|
+
('postgis_sfcgal_version', String,
|
539
550
|
'''Returns the version of SFCGAL in use'''),
|
540
551
|
('ST_Extrude', types.Geometry,
|
541
552
|
'''Extrude a surface to a related volume'''),
|
@@ -543,9 +554,11 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
543
554
|
'''Compute a straight skeleton from a geometry'''),
|
544
555
|
('ST_ApproximateMedialAxis', types.Geometry,
|
545
556
|
'''Compute the approximate medial axis of an areal geometry.'''),
|
546
|
-
('ST_IsPlanar',
|
557
|
+
('ST_IsPlanar', Boolean,
|
547
558
|
'''Check if a surface is or not planar'''),
|
548
|
-
('ST_Orientation',
|
559
|
+
('ST_Orientation', Integer,
|
560
|
+
'''Determine surface orientation'''),
|
561
|
+
('CG_Orientation', Integer,
|
549
562
|
'''Determine surface orientation'''),
|
550
563
|
('ST_ForceLHR', types.Geometry,
|
551
564
|
'''Force LHR orientation'''),
|
@@ -559,59 +572,63 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
559
572
|
'''Perform 3D difference'''),
|
560
573
|
('ST_3DUnion', types.Geometry,
|
561
574
|
'''Perform 3D union'''),
|
562
|
-
('ST_3DArea',
|
575
|
+
('ST_3DArea', Float,
|
576
|
+
'''Computes area of 3D surface geometries. Will return 0 for solids.'''),
|
577
|
+
('CG_3DArea', Float,
|
563
578
|
'''Computes area of 3D surface geometries. Will return 0 for solids.'''),
|
564
579
|
('ST_Tesselate', types.Geometry,
|
565
580
|
'''Perform surface Tessellation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS'''),
|
566
|
-
('ST_Volume',
|
581
|
+
('ST_Volume', Float,
|
567
582
|
'''Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.'''),
|
568
583
|
('ST_MakeSolid', types.Geometry,
|
569
584
|
'''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.'''),
|
570
|
-
('ST_IsSolid',
|
585
|
+
('ST_IsSolid', Boolean,
|
586
|
+
'''Test if the geometry is a solid. No validity check is performed.'''),
|
587
|
+
('CG_IsSolid', Boolean,
|
571
588
|
'''Test if the geometry is a solid. No validity check is performed.'''),
|
572
|
-
('AddAuth',
|
589
|
+
('AddAuth', Boolean,
|
573
590
|
'''Adds an authorization token to be used in the current transaction.'''),
|
574
|
-
('CheckAuth',
|
591
|
+
('CheckAuth', Integer,
|
575
592
|
'''Creates a trigger on a table to prevent/allow updates and deletes of rows based on authorization token.'''),
|
576
|
-
('DisableLongTransactions',
|
593
|
+
('DisableLongTransactions', String,
|
577
594
|
'''Disables long transaction support.'''),
|
578
|
-
('EnableLongTransactions',
|
595
|
+
('EnableLongTransactions', String,
|
579
596
|
'''Enables long transaction support.'''),
|
580
|
-
('LockRow',
|
597
|
+
('LockRow', Integer,
|
581
598
|
'''Sets lock/authorization for a row in a table.'''),
|
582
|
-
('UnlockRows',
|
599
|
+
('UnlockRows', Integer,
|
583
600
|
'''Removes all locks held by an authorization token.'''),
|
584
|
-
('PostGIS_Extensions_Upgrade',
|
601
|
+
('PostGIS_Extensions_Upgrade', String,
|
585
602
|
'''Packages and upgrades postgis extensions (e.g. postgis_raster, postgis_topology, postgis_sfcgal) to latest available version.'''),
|
586
|
-
('PostGIS_Full_Version',
|
603
|
+
('PostGIS_Full_Version', String,
|
587
604
|
'''Reports full postgis version and build configuration infos.'''),
|
588
|
-
('PostGIS_GEOS_Version',
|
605
|
+
('PostGIS_GEOS_Version', String,
|
589
606
|
'''Returns the version number of the GEOS library.'''),
|
590
|
-
('PostGIS_Liblwgeom_Version',
|
607
|
+
('PostGIS_Liblwgeom_Version', String,
|
591
608
|
'''Returns the version number of the liblwgeom library. This should match the version of PostGIS.'''),
|
592
|
-
('PostGIS_LibXML_Version',
|
609
|
+
('PostGIS_LibXML_Version', String,
|
593
610
|
'''Returns the version number of the libxml2 library.'''),
|
594
|
-
('PostGIS_Lib_Build_Date',
|
611
|
+
('PostGIS_Lib_Build_Date', String,
|
595
612
|
'''Returns build date of the PostGIS library.'''),
|
596
|
-
('PostGIS_Lib_Version',
|
613
|
+
('PostGIS_Lib_Version', String,
|
597
614
|
'''Returns the version number of the PostGIS library.'''),
|
598
|
-
('PostGIS_PROJ_Version',
|
615
|
+
('PostGIS_PROJ_Version', String,
|
599
616
|
'''Returns the version number of the PROJ4 library.'''),
|
600
|
-
('PostGIS_Wagyu_Version',
|
617
|
+
('PostGIS_Wagyu_Version', String,
|
601
618
|
'''Returns the version number of the internal Wagyu library.'''),
|
602
|
-
('PostGIS_Scripts_Build_Date',
|
619
|
+
('PostGIS_Scripts_Build_Date', String,
|
603
620
|
'''Returns build date of the PostGIS scripts.'''),
|
604
|
-
('PostGIS_Scripts_Installed',
|
621
|
+
('PostGIS_Scripts_Installed', String,
|
605
622
|
'''Returns version of the postgis scripts installed in this database.'''),
|
606
|
-
('PostGIS_Scripts_Released',
|
623
|
+
('PostGIS_Scripts_Released', String,
|
607
624
|
'''Returns the version number of the postgis.sql script released with the installed postgis lib.'''),
|
608
|
-
('PostGIS_Version',
|
625
|
+
('PostGIS_Version', String,
|
609
626
|
'''Returns PostGIS version number and compile-time options.'''),
|
610
627
|
('PostGIS_AddBBox', types.Geometry,
|
611
628
|
'''Add bounding box to the geometry.'''),
|
612
629
|
('PostGIS_DropBBox', types.Geometry,
|
613
630
|
'''Drop the bounding box cache from the geometry.'''),
|
614
|
-
('PostGIS_HasBBox',
|
631
|
+
('PostGIS_HasBBox', Boolean,
|
615
632
|
'''Returns TRUE if the bbox of this geometry is cached, FALSE otherwise.'''),
|
616
633
|
('ST_AddBand', types.Raster,
|
617
634
|
('''Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.''', 'RT_ST_AddBand')),
|
@@ -629,63 +646,63 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
629
646
|
('''Return a set of configured tiles from an arbitrarily tiled raster coverage.''', 'RT_ST_Retile')),
|
630
647
|
('ST_FromGDALRaster', types.Raster,
|
631
648
|
('''Returns a raster from a supported GDAL raster file.''', 'RT_ST_FromGDALRaster')),
|
632
|
-
('ST_GeoReference',
|
649
|
+
('ST_GeoReference', String,
|
633
650
|
('''Returns the georeference meta data in GDAL or ESRI format as commonly seen in a world file. Default is GDAL.''', 'RT_ST_GeoReference')),
|
634
|
-
('ST_Height',
|
651
|
+
('ST_Height', Integer,
|
635
652
|
('''Returns the height of the raster in pixels.''', 'RT_ST_Height')),
|
636
653
|
('ST_MetaData', None,
|
637
654
|
('''Returns basic meta data about a raster object such as pixel size, rotation (skew), upper, lower left, etc.''', 'RT_ST_MetaData')),
|
638
|
-
('ST_NumBands',
|
655
|
+
('ST_NumBands', Integer,
|
639
656
|
('''Returns the number of bands in the raster object.''', 'RT_ST_NumBands')),
|
640
|
-
('ST_PixelHeight',
|
657
|
+
('ST_PixelHeight', Double,
|
641
658
|
('''Returns the pixel height in geometric units of the spatial reference system.''', 'RT_ST_PixelHeight')),
|
642
|
-
('ST_PixelWidth',
|
659
|
+
('ST_PixelWidth', Double,
|
643
660
|
('''Returns the pixel width in geometric units of the spatial reference system.''', 'RT_ST_PixelWidth')),
|
644
|
-
('ST_ScaleX',
|
661
|
+
('ST_ScaleX', Float,
|
645
662
|
('''Returns the X component of the pixel width in units of coordinate reference system.''', 'RT_ST_ScaleX')),
|
646
|
-
('ST_ScaleY',
|
663
|
+
('ST_ScaleY', Float,
|
647
664
|
('''Returns the Y component of the pixel height in units of coordinate reference system.''', 'RT_ST_ScaleY')),
|
648
665
|
('ST_RasterToWorldCoord', None,
|
649
666
|
('''Returns the raster's upper left corner as geometric X and Y (longitude and latitude) given a column and row. Column and row starts at 1.''', 'RT_ST_RasterToWorldCoord')),
|
650
|
-
('ST_RasterToWorldCoordX',
|
667
|
+
('ST_RasterToWorldCoordX', Float,
|
651
668
|
('''Returns the geometric X coordinate upper left of a raster, column and row. Numbering of columns and rows starts at 1.''', 'RT_ST_RasterToWorldCoordX')),
|
652
|
-
('ST_RasterToWorldCoordY',
|
669
|
+
('ST_RasterToWorldCoordY', Float,
|
653
670
|
('''Returns the geometric Y coordinate upper left corner of a raster, column and row. Numbering of columns and rows starts at 1.''', 'RT_ST_RasterToWorldCoordY')),
|
654
|
-
('ST_Rotation',
|
671
|
+
('ST_Rotation', Float,
|
655
672
|
('''Returns the rotation of the raster in radian.''', 'RT_ST_Rotation')),
|
656
|
-
('ST_SkewX',
|
673
|
+
('ST_SkewX', Float,
|
657
674
|
('''Returns the georeference X skew (or rotation parameter).''', 'RT_ST_SkewX')),
|
658
|
-
('ST_SkewY',
|
675
|
+
('ST_SkewY', Float,
|
659
676
|
('''Returns the georeference Y skew (or rotation parameter).''', 'RT_ST_SkewY')),
|
660
|
-
('ST_UpperLeftX',
|
677
|
+
('ST_UpperLeftX', Float,
|
661
678
|
('''Returns the upper left X coordinate of raster in projected spatial ref.''', 'RT_ST_UpperLeftX')),
|
662
|
-
('ST_UpperLeftY',
|
679
|
+
('ST_UpperLeftY', Float,
|
663
680
|
('''Returns the upper left Y coordinate of raster in projected spatial ref.''', 'RT_ST_UpperLeftY')),
|
664
|
-
('ST_Width',
|
681
|
+
('ST_Width', Integer,
|
665
682
|
('''Returns the width of the raster in pixels.''', 'RT_ST_Width')),
|
666
683
|
('ST_WorldToRasterCoord', None,
|
667
684
|
('''Returns the upper left corner as column and row given geometric X and Y (longitude and latitude) or a point geometry expressed in the spatial reference coordinate system of the raster.''', 'RT_ST_WorldToRasterCoord')),
|
668
|
-
('ST_WorldToRasterCoordX',
|
685
|
+
('ST_WorldToRasterCoordX', Integer,
|
669
686
|
('''Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.''', 'RT_ST_WorldToRasterCoordX')),
|
670
|
-
('ST_WorldToRasterCoordY',
|
687
|
+
('ST_WorldToRasterCoordY', Integer,
|
671
688
|
('''Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.''', 'RT_ST_WorldToRasterCoordY')),
|
672
689
|
('ST_BandMetaData', None,
|
673
690
|
('''Returns basic meta data for a specific raster band. band num 1 is assumed if none-specified.''', 'RT_ST_BandMetaData')),
|
674
|
-
('ST_BandNoDataValue',
|
691
|
+
('ST_BandNoDataValue', Double,
|
675
692
|
('''Returns the value in a given band that represents no data. If no band num 1 is assumed.''', 'RT_ST_BandNoDataValue')),
|
676
|
-
('ST_BandIsNoData',
|
693
|
+
('ST_BandIsNoData', Boolean,
|
677
694
|
('''Returns true if the band is filled with only nodata values.''', 'RT_ST_BandIsNoData')),
|
678
|
-
('ST_BandPath',
|
695
|
+
('ST_BandPath', String,
|
679
696
|
('''Returns system file path to a band stored in file system. If no bandnum specified, 1 is assumed.''', 'RT_ST_BandPath')),
|
680
|
-
('ST_BandFileSize',
|
697
|
+
('ST_BandFileSize', Integer,
|
681
698
|
('''Returns the file size of a band stored in file system. If no bandnum specified, 1 is assumed.''', 'RT_ST_BandFileSize')),
|
682
|
-
('ST_BandFileTimestamp',
|
699
|
+
('ST_BandFileTimestamp', Integer,
|
683
700
|
('''Returns the file timestamp of a band stored in file system. If no bandnum specified, 1 is assumed.''', 'RT_ST_BandFileTimestamp')),
|
684
|
-
('ST_BandPixelType',
|
701
|
+
('ST_BandPixelType', String,
|
685
702
|
('''Returns the type of pixel for given band. If no bandnum specified, 1 is assumed.''', 'RT_ST_BandPixelType')),
|
686
|
-
('ST_MinPossibleValue',
|
703
|
+
('ST_MinPossibleValue', Integer,
|
687
704
|
'''Returns the minimum value this pixeltype can store.'''),
|
688
|
-
('ST_HasNoBand',
|
705
|
+
('ST_HasNoBand', Boolean,
|
689
706
|
('''Returns true if there is no band with given band number. If no band number is specified, then band number 1 is assumed.''', 'RT_ST_HasNoBand')),
|
690
707
|
('ST_PixelAsPolygon', types.Geometry,
|
691
708
|
('''Returns the polygon geometry that bounds the pixel for a particular row and column.''', 'RT_ST_PixelAsPolygon')),
|
@@ -699,9 +716,9 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
699
716
|
('''Returns the centroid (point geometry) of the area represented by a pixel.''', 'RT_ST_PixelAsCentroid')),
|
700
717
|
('ST_PixelAsCentroids', None,
|
701
718
|
('''Returns the centroid (point geometry) for each pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel. The point geometry is the centroid of the area represented by a pixel.''', 'RT_ST_PixelAsCentroids')),
|
702
|
-
('ST_Value',
|
719
|
+
('ST_Value', Double,
|
703
720
|
('''Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.''', 'RT_ST_Value')),
|
704
|
-
('ST_NearestValue',
|
721
|
+
('ST_NearestValue', Double,
|
705
722
|
('''Returns the nearest non-NODATA value of a given band's pixel specified by a columnx and rowy or a geometric point expressed in the same spatial reference coordinate system as the raster.''', 'RT_ST_NearestValue')),
|
706
723
|
('ST_Neighborhood', None,
|
707
724
|
('''Returns a 2-D double precision array of the non-NODATA values around a given band's pixel specified by either a columnX and rowY or a geometric point expressed in the same spatial reference coordinate system as the raster.''', 'RT_ST_Neighborhood')),
|
@@ -739,9 +756,9 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
739
756
|
('''Update the external path and band number of an out-db band''', 'RT_ST_SetBandPath')),
|
740
757
|
('ST_SetBandIndex', types.Raster,
|
741
758
|
('''Update the external band number of an out-db band''', 'RT_ST_SetBandIndex')),
|
742
|
-
('ST_Count',
|
759
|
+
('ST_Count', Integer,
|
743
760
|
('''Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.''', 'RT_ST_Count')),
|
744
|
-
('ST_CountAgg',
|
761
|
+
('ST_CountAgg', Integer,
|
745
762
|
('''Aggregate. Returns the number of pixels in a given band of a set of rasters. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the NODATA value.''', 'RT_ST_CountAgg')),
|
746
763
|
('ST_Histogram', None,
|
747
764
|
('''Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.''', 'RT_ST_Histogram')),
|
@@ -757,17 +774,17 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
757
774
|
('''Return a raster value from a Well-Known Binary (WKB) raster.''', 'RT_ST_RastFromWKB')),
|
758
775
|
('ST_RastFromHexWKB', types.Raster,
|
759
776
|
('''Return a raster value from a Hex representation of Well-Known Binary (WKB) raster.''', 'RT_ST_RastFromHexWKB')),
|
760
|
-
('ST_AsWKB',
|
777
|
+
('ST_AsWKB', LargeBinary,
|
761
778
|
('''Return the Well-Known Binary (WKB) representation of the raster.''', 'RT_ST_AsBinary')),
|
762
|
-
('ST_AsHexWKB',
|
779
|
+
('ST_AsHexWKB', LargeBinary,
|
763
780
|
('''Return the Well-Known Binary (WKB) in Hex representation of the raster.''', 'RT_ST_AsHexWKB')),
|
764
|
-
('ST_AsGDALRaster',
|
781
|
+
('ST_AsGDALRaster', LargeBinary,
|
765
782
|
('''Return the raster tile in the designated GDAL Raster format. Raster formats are one of those supported by your compiled library. Use ST_GDALDrivers() to get a list of formats supported by your library.''', 'RT_ST_AsGDALRaster')),
|
766
|
-
('ST_AsJPEG',
|
783
|
+
('ST_AsJPEG', LargeBinary,
|
767
784
|
('''Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.''', 'RT_ST_AsJPEG')),
|
768
|
-
('ST_AsPNG',
|
785
|
+
('ST_AsPNG', LargeBinary,
|
769
786
|
('''Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.''', 'RT_ST_AsPNG')),
|
770
|
-
('ST_AsTIFF',
|
787
|
+
('ST_AsTIFF', LargeBinary,
|
771
788
|
('''Return the raster selected bands as a single TIFF image (byte array). If no band is specified or any of specified bands does not exist in the raster, then will try to use all bands.''', 'RT_ST_AsTIFF')),
|
772
789
|
('ST_Clip', types.Raster,
|
773
790
|
('''Returns the raster clipped by the input geometry. If band number not is specified, all bands are processed. If crop is not specified or TRUE, the output raster is cropped.''', 'RT_ST_Clip')),
|
@@ -775,7 +792,7 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
775
792
|
('''Creates a new raster of up to four 8BUI bands (grayscale, RGB, RGBA) from the source raster and a specified band. Band 1 is assumed if not specified.''', 'RT_ST_ColorMap')),
|
776
793
|
('ST_Grayscale', types.Raster,
|
777
794
|
('''Creates a new one-8BUI band raster from the source raster and specified bands representing Red, Green and Blue''', 'RT_ST_Grayscale')),
|
778
|
-
('ST_MapAlgebra',
|
795
|
+
('ST_MapAlgebra', types.Raster,
|
779
796
|
('''[raster] Callback function version - Returns a one-band raster given one or more input rasters, band indexes and one user-specified callback function.\nOR\n[raster] Expression version - Returns a one-band raster given one or two input rasters, band indexes and one or more user-specified SQL expressions.''', 'RT_ST_MapAlgebra')),
|
780
797
|
('ST_MapAlgebraExpr', types.Raster,
|
781
798
|
('''[raster] 1 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the input raster band and of pixeltype provided. Band 1 is assumed if no band is specified.\nOR\n[raster] 2 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the two input raster bands and of pixeltype provided. band 1 of each raster is assumed if no band numbers are specified. The resulting raster will be aligned (scale, skew and pixel corners) on the grid defined by the first raster and have its extent defined by the \"extenttype\" parameter. Values for \"extenttype\" can be: INTERSECTION, UNION, FIRST, SECOND.''', 'RT_ST_MapAlgebraExpr')),
|
@@ -819,11 +836,11 @@ _FUNCTIONS: List[Tuple[str, Optional[type], Union[None, str, Tuple[str, str]]]]
|
|
819
836
|
('''Returns a set of geomval (geom,val) rows, from a given raster band. If no band number is specified, band num defaults to 1.''', 'RT_ST_DumpAsPolygons')),
|
820
837
|
('ST_MinConvexHull', types.Geometry,
|
821
838
|
('''Return the convex hull geometry of the raster excluding NODATA pixels.''', 'RT_ST_MinConvexHull')),
|
822
|
-
('ST_SameAlignment',
|
839
|
+
('ST_SameAlignment', Boolean,
|
823
840
|
('''Returns true if rasters have same skew, scale, spatial ref, and offset (pixels can be put on same grid without cutting into pixels) and false if they don't with notice detailing issue.''', 'RT_ST_SameAlignment')),
|
824
|
-
('ST_NotSameAlignmentReason',
|
841
|
+
('ST_NotSameAlignmentReason', String,
|
825
842
|
('''Returns text stating if rasters are aligned and if not aligned, a reason why.''', 'RT_ST_NotSameAlignmentReason')),
|
826
|
-
('ST_Distance_Sphere',
|
843
|
+
('ST_Distance_Sphere', Float,
|
827
844
|
'''Returns minimum distance in meters between two lon/lat geometries. Uses a spherical earth and radius of 6370986 meters. Faster than ``ST_Distance_Spheroid``, but less accurate. PostGIS versions prior to 1.5 only implemented for points.'''),
|
828
845
|
]
|
829
846
|
# fmt: on
|