From 03fa25baa8516ad27004983096ac159be755e26a Mon Sep 17 00:00:00 2001 From: Alvaro Huarte Date: Thu, 4 Apr 2024 02:37:43 +0200 Subject: [PATCH] Remove docs in old style, they will be added later in current style --- .../aggregate/st_raster_mosaic_agg.md | 55 -------------- .../aggregate/st_raster_union_agg.md | 54 -------------- .../functions/scalar/st_getbandcolorinterp.md | 56 -------------- .../scalar/st_getbandcolorinterpname.md | 56 -------------- .../functions/scalar/st_getbandnodatavalue.md | 36 --------- .../functions/scalar/st_getbandpixeltype.md | 54 -------------- .../scalar/st_getbandpixeltypename.md | 54 -------------- docs/src/functions/scalar/st_getgeometry.md | 32 -------- docs/src/functions/scalar/st_hasnoband.md | 37 ---------- docs/src/functions/scalar/st_height.md | 32 -------- docs/src/functions/scalar/st_numbands.md | 32 -------- docs/src/functions/scalar/st_pixelheight.md | 33 --------- docs/src/functions/scalar/st_pixelwidth.md | 33 --------- docs/src/functions/scalar/st_rasterasfile.md | 52 ------------- docs/src/functions/scalar/st_rasterclip.md | 61 --------------- .../src/functions/scalar/st_rasterfromfile.md | 38 ---------- .../functions/scalar/st_rastertoworldcoord.md | 41 ---------- .../scalar/st_rastertoworldcoordx.md | 41 ---------- .../scalar/st_rastertoworldcoordy.md | 41 ---------- docs/src/functions/scalar/st_rasterwarp.md | 48 ------------ docs/src/functions/scalar/st_scalex.md | 33 --------- docs/src/functions/scalar/st_scaley.md | 33 --------- docs/src/functions/scalar/st_skewx.md | 33 --------- docs/src/functions/scalar/st_skewy.md | 33 --------- docs/src/functions/scalar/st_srid.md | 33 --------- docs/src/functions/scalar/st_upperleftx.md | 32 -------- docs/src/functions/scalar/st_upperlefty.md | 32 -------- docs/src/functions/scalar/st_value.md | 45 ----------- docs/src/functions/scalar/st_width.md | 32 -------- .../functions/scalar/st_worldtorastercoord.md | 41 ---------- .../scalar/st_worldtorastercoordx.md | 41 ---------- .../scalar/st_worldtorastercoordy.md | 41 ---------- docs/src/types/raster.md | 0 docs/st_read_raster.md | 74 ------------------- docs/st_read_raster_meta.md | 62 ---------------- 35 files changed, 1451 deletions(-) delete mode 100644 docs/src/functions/aggregate/st_raster_mosaic_agg.md delete mode 100644 docs/src/functions/aggregate/st_raster_union_agg.md delete mode 100644 docs/src/functions/scalar/st_getbandcolorinterp.md delete mode 100644 docs/src/functions/scalar/st_getbandcolorinterpname.md delete mode 100644 docs/src/functions/scalar/st_getbandnodatavalue.md delete mode 100644 docs/src/functions/scalar/st_getbandpixeltype.md delete mode 100644 docs/src/functions/scalar/st_getbandpixeltypename.md delete mode 100644 docs/src/functions/scalar/st_getgeometry.md delete mode 100644 docs/src/functions/scalar/st_hasnoband.md delete mode 100644 docs/src/functions/scalar/st_height.md delete mode 100644 docs/src/functions/scalar/st_numbands.md delete mode 100644 docs/src/functions/scalar/st_pixelheight.md delete mode 100644 docs/src/functions/scalar/st_pixelwidth.md delete mode 100644 docs/src/functions/scalar/st_rasterasfile.md delete mode 100644 docs/src/functions/scalar/st_rasterclip.md delete mode 100644 docs/src/functions/scalar/st_rasterfromfile.md delete mode 100644 docs/src/functions/scalar/st_rastertoworldcoord.md delete mode 100644 docs/src/functions/scalar/st_rastertoworldcoordx.md delete mode 100644 docs/src/functions/scalar/st_rastertoworldcoordy.md delete mode 100644 docs/src/functions/scalar/st_rasterwarp.md delete mode 100644 docs/src/functions/scalar/st_scalex.md delete mode 100644 docs/src/functions/scalar/st_scaley.md delete mode 100644 docs/src/functions/scalar/st_skewx.md delete mode 100644 docs/src/functions/scalar/st_skewy.md delete mode 100644 docs/src/functions/scalar/st_srid.md delete mode 100644 docs/src/functions/scalar/st_upperleftx.md delete mode 100644 docs/src/functions/scalar/st_upperlefty.md delete mode 100644 docs/src/functions/scalar/st_value.md delete mode 100644 docs/src/functions/scalar/st_width.md delete mode 100644 docs/src/functions/scalar/st_worldtorastercoord.md delete mode 100644 docs/src/functions/scalar/st_worldtorastercoordx.md delete mode 100644 docs/src/functions/scalar/st_worldtorastercoordy.md delete mode 100644 docs/src/types/raster.md delete mode 100644 docs/st_read_raster.md delete mode 100644 docs/st_read_raster_meta.md diff --git a/docs/src/functions/aggregate/st_raster_mosaic_agg.md b/docs/src/functions/aggregate/st_raster_mosaic_agg.md deleted file mode 100644 index 2042f651..00000000 --- a/docs/src/functions/aggregate/st_raster_mosaic_agg.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -{ - "type": "aggregate_function", - "title": "ST_RasterMosaic_Agg", - "id": "st_rastermosaic_agg", - "signatures": [ - { - "returns": "RASTER", - "parameters": [ - { - "name": "rasters", - "type": "RASTER[]" - }, - { - "name": "options", - "type": "VARCHAR[]" - } - ] - } - ], - "summary": "Computes a mosaic of a set of input rasters", - "see_also": [ "st_rasterunion_agg" ], - "tags": [ - "construction" - ] -} ---- - -### Description - -Returns a mosaic of a set of raster tiles into a single raster. - -Tiles are considered as source rasters of a larger mosaic and the result dataset has as many -bands as one of the input files. - -`options` is optional, an array of parameters like [GDALBuildVRT](https://gdal.org/programs/gdalbuildvrt.html). - -### Examples - -```sql -WITH __input AS ( - SELECT - 1 AS raster_id, - ST_RasterFromFile(file) AS raster - FROM - glob('./test/data/mosaic/*.tiff') -), -SELECT - ST_RasterMosaic_Agg(raster, options => ['-r', 'bilinear']) AS r -FROM - __input -GROUP BY - raster_id -; -``` diff --git a/docs/src/functions/aggregate/st_raster_union_agg.md b/docs/src/functions/aggregate/st_raster_union_agg.md deleted file mode 100644 index f112d0b7..00000000 --- a/docs/src/functions/aggregate/st_raster_union_agg.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -{ - "type": "aggregate_function", - "title": "ST_RasterUnion_Agg", - "id": "st_rasterunion_agg", - "signatures": [ - { - "returns": "RASTER", - "parameters": [ - { - "name": "rasters", - "type": "RASTER[]" - }, - { - "name": "options", - "type": "VARCHAR[]" - } - ] - } - ], - "summary": "Computes the union of a set of input rasters", - "see_also": [ "st_rastermosaic_agg" ], - "tags": [ - "construction" - ] -} ---- - -### Description - -Returns the union of a set of raster tiles into a single raster composed of at least one band. - -Each tiles goes into a separate band in the result dataset. - -`options` is optional, an array of parameters like [GDALBuildVRT](https://gdal.org/programs/gdalbuildvrt.html). - -### Examples - -```sql -WITH __input AS ( - SELECT - 1 AS raster_id, - ST_RasterFromFile(file) AS raster - FROM - glob('./test/data/bands/*.tiff') -), -SELECT - ST_RasterUnion_Agg(raster, options => ['-resolution', 'highest']) AS r -FROM - __input -GROUP BY - raster_id -; -``` diff --git a/docs/src/functions/scalar/st_getbandcolorinterp.md b/docs/src/functions/scalar/st_getbandcolorinterp.md deleted file mode 100644 index 9b9a22b5..00000000 --- a/docs/src/functions/scalar/st_getbandcolorinterp.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -{ - "id": "st_getbandcolorinterp", - "title": "ST_GetBandColorInterp", - "type": "scalar_function", - "signatures": [ - { - "returns": "INT", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "bandnum", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the color interpretation of a band in the raster", - "see_also": [ "ST_GetBandColorInterpName" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the color interpretation of a band in the raster. - -This is a code in the enumeration: - -+ Undefined = 0: Undefined -+ GrayIndex = 1: Greyscale -+ PaletteIndex = 2: Paletted (see associated color table) -+ RedBand = 3: Red band of RGBA image -+ GreenBand = 4: Green band of RGBA image -+ BlueBand = 5: Blue band of RGBA image -+ AlphaBand = 6: Alpha (0=transparent, 255=opaque) -+ HueBand = 7: Hue band of HLS image -+ SaturationBand = 8: Saturation band of HLS image -+ LightnessBand = 9: Lightness band of HLS image -+ CyanBand = 10: Cyan band of CMYK image -+ MagentaBand = 11: Magenta band of CMYK image -+ YellowBand = 12: Yellow band of CMYK image -+ BlackBand = 13: Black band of CMYK image -+ YCbCr_YBand = 14: Y Luminance -+ YCbCr_CbBand = 15: Cb Chroma -+ YCbCr_CrBand = 16: Cr Chroma - -### Examples - -```sql -SELECT ST_GetBandColorInterp(raster, 1) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_getbandcolorinterpname.md b/docs/src/functions/scalar/st_getbandcolorinterpname.md deleted file mode 100644 index 07bc0d8f..00000000 --- a/docs/src/functions/scalar/st_getbandcolorinterpname.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -{ - "id": "st_getbandcolorinterpname", - "title": "ST_GetBandColorInterpName", - "type": "scalar_function", - "signatures": [ - { - "returns": "VARCHAR", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "bandnum", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the color interpretation name of a band in the raster", - "see_also": [ "ST_GetBandColorInterp" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the color interpretation name of a band in the raster. - -This is a string in the enumeration: - -+ Undefined: Undefined -+ Greyscale: Greyscale -+ Paletted: Paletted (see associated color table) -+ Red: Red band of RGBA image -+ Green: Green band of RGBA image -+ Blue: Blue band of RGBA image -+ Alpha: Alpha (0=transparent, 255=opaque) -+ Hue: Hue band of HLS image -+ Saturation: Saturation band of HLS image -+ Lightness: Lightness band of HLS image -+ Cyan: Cyan band of CMYK image -+ Magenta: Magenta band of CMYK image -+ Yellow: Yellow band of CMYK image -+ Black: Black band of CMYK image -+ YLuminance: Y Luminance -+ CbChroma: Cb Chroma -+ CrChroma: Cr Chroma - -### Examples - -```sql -SELECT ST_GetBandColorInterpName(raster, 1) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_getbandnodatavalue.md b/docs/src/functions/scalar/st_getbandnodatavalue.md deleted file mode 100644 index b4ccff03..00000000 --- a/docs/src/functions/scalar/st_getbandnodatavalue.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -{ - "id": "st_getbandnodatavalue", - "title": "ST_GetBandNoDataValue", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "bandnum", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the NODATA value of a band in the raster", - "see_also": [], - "tags": [ "property" ] -} ---- - -### Description - -Returns the NODATA value of a band in the raster. - -### Examples - -```sql -SELECT ST_GetBandNoDataValue(raster, 1) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_getbandpixeltype.md b/docs/src/functions/scalar/st_getbandpixeltype.md deleted file mode 100644 index b6051ee8..00000000 --- a/docs/src/functions/scalar/st_getbandpixeltype.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -{ - "id": "st_getbandpixeltype", - "title": "ST_GetBandPixelType", - "type": "scalar_function", - "signatures": [ - { - "returns": "INT", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "bandnum", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the pixel type of a band in the raster", - "see_also": [ "ST_GetBandPixelTypeName" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the pixel type of a band in the raster. - -This is a code in the enumeration: - -+ Unknown = 0: Unknown or unspecified type -+ Byte = 1: Eight bit unsigned integer -+ Int8 = 14: 8-bit signed integer -+ UInt16 = 2: Sixteen bit unsigned integer -+ Int16 = 3: Sixteen bit signed integer -+ UInt32 = 4: Thirty two bit unsigned integer -+ Int32 = 5: Thirty two bit signed integer -+ UInt64 = 12: 64 bit unsigned integer -+ Int64 = 13: 64 bit signed integer -+ Float32 = 6: Thirty two bit floating point -+ Float64 = 7: Sixty four bit floating point -+ CInt16 = 8: Complex Int16 -+ CInt32 = 9: Complex Int32 -+ CFloat32 = 10: Complex Float32 -+ CFloat64 = 11: Complex Float64 - -### Examples - -```sql -SELECT ST_GetBandPixelType(raster, 1) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_getbandpixeltypename.md b/docs/src/functions/scalar/st_getbandpixeltypename.md deleted file mode 100644 index 019617b4..00000000 --- a/docs/src/functions/scalar/st_getbandpixeltypename.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -{ - "id": "st_getbandpixeltypename", - "title": "ST_GetBandPixelTypeName", - "type": "scalar_function", - "signatures": [ - { - "returns": "VARCHAR", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "bandnum", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the pixel type name of a band in the raster", - "see_also": [ "ST_GetBandPixelType" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the pixel type name of a band in the raster. - -This is a string in the enumeration: - -+ Unknown: Unknown or unspecified type -+ Byte: Eight bit unsigned integer -+ Int8: 8-bit signed integer -+ UInt16: Sixteen bit unsigned integer -+ Int16: Sixteen bit signed integer -+ UInt32: Thirty two bit unsigned integer -+ Int32: Thirty two bit signed integer -+ UInt64: 64 bit unsigned integer -+ Int64: 64 bit signed integer -+ Float32: Thirty two bit floating point -+ Float64: Sixty four bit floating point -+ CInt16: Complex Int16 -+ CInt32: Complex Int32 -+ CFloat32: Complex Float32 -+ CFloat64: Complex Float64 - -### Examples - -```sql -SELECT ST_GetBandPixelTypeName(raster, 1) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_getgeometry.md b/docs/src/functions/scalar/st_getgeometry.md deleted file mode 100644 index 2c136e81..00000000 --- a/docs/src/functions/scalar/st_getgeometry.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -{ - "id": "st_getgeometry", - "title": "ST_GetGeometry", - "type": "scalar_function", - "signatures": [ - { - "returns": "GEOMETRY", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the polygon representation of the extent of the raster", - "see_also": [ "st_srid" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the polygon representation of the extent of the raster. - -### Examples - -```sql -SELECT ST_GetGeometry(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_hasnoband.md b/docs/src/functions/scalar/st_hasnoband.md deleted file mode 100644 index 22f430dc..00000000 --- a/docs/src/functions/scalar/st_hasnoband.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -{ - "id": "st_hasnoband", - "title": "ST_HasNoBand", - "type": "scalar_function", - "signatures": [ - { - "returns": "BOOL", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "bandnum", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns true if there is no band with given band number", - "see_also": [ "ST_NumBands" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns true if there is no band with given band number. -Band numbers start at 1 and band is assumed to be 1 if not specified. - -### Examples - -```sql -SELECT ST_HasNoBand(raster, 1) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_height.md b/docs/src/functions/scalar/st_height.md deleted file mode 100644 index 12ab4460..00000000 --- a/docs/src/functions/scalar/st_height.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -{ - "id": "st_height", - "title": "ST_Height", - "type": "scalar_function", - "signatures": [ - { - "returns": "INT", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the height of the raster in pixels", - "see_also": [ "st_width" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the height of the raster in pixels. - -### Examples - -```sql -SELECT ST_Height(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_numbands.md b/docs/src/functions/scalar/st_numbands.md deleted file mode 100644 index d7f860da..00000000 --- a/docs/src/functions/scalar/st_numbands.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -{ - "id": "st_numbands", - "title": "ST_NumBands", - "type": "scalar_function", - "signatures": [ - { - "returns": "INT", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the number of bands in the raster", - "see_also": [ "ST_HasNoBand" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the number of bands in the raster. - -### Examples - -```sql -SELECT ST_NumBands(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_pixelheight.md b/docs/src/functions/scalar/st_pixelheight.md deleted file mode 100644 index 82a4ba35..00000000 --- a/docs/src/functions/scalar/st_pixelheight.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -{ - "id": "st_pixelheight", - "title": "ST_PixelHeight", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the height of a pixel in geometric units of the spatial reference system", - "see_also": [ "st_pixelwidth" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the height of a pixel in geometric units of the spatial reference system. -In the common case where there is no skew, the pixel height is just the scale ratio between geometric coordinates and raster pixels. - -### Examples - -```sql -SELECT ST_PixelHeight(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_pixelwidth.md b/docs/src/functions/scalar/st_pixelwidth.md deleted file mode 100644 index 28e90a9e..00000000 --- a/docs/src/functions/scalar/st_pixelwidth.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -{ - "id": "st_pixelwidth", - "title": "ST_PixelWidth", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the width of a pixel in geometric units of the spatial reference system", - "see_also": [ "st_pixelheight" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the width of a pixel in geometric units of the spatial reference system. -In the common case where there is no skew, the pixel width is just the scale ratio between geometric coordinates and raster pixels. - -### Examples - -```sql -SELECT ST_PixelWidth(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_rasterasfile.md b/docs/src/functions/scalar/st_rasterasfile.md deleted file mode 100644 index 5960aea5..00000000 --- a/docs/src/functions/scalar/st_rasterasfile.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -{ - "id": "st_rasterasfile", - "title": "ST_RasterAsFile", - "type": "scalar_function", - "signatures": [ - { - "returns": "RASTER", - "parameters": [ - { - "name": "file", - "type": "VARCHAR" - }, - { - "name": "driver", - "type": "VARCHAR" - }, - { - "name": "write_options", - "type": "VARCHAR[]" - } - ] - } - ], - "aliases": [], - "summary": "Writes a raster to a file path", - "see_also": [ ], - "tags": [ "construction" ] -} ---- - -### Description - -Writes a raster to a file path. - -`write_options` is optional, an array of parameters for the GDAL driver specified. - -### Examples - -```sql -WITH __input AS ( - SELECT - ST_RasterFromFile(file) AS raster - FROM - glob('./test/data/mosaic/SCL.tif-land-clip00.tiff') -) -SELECT - ST_RasterAsFile(raster, './rasterasfile.tiff', 'Gtiff') AS result -FROM - __input -; -``` diff --git a/docs/src/functions/scalar/st_rasterclip.md b/docs/src/functions/scalar/st_rasterclip.md deleted file mode 100644 index 5a6fb59c..00000000 --- a/docs/src/functions/scalar/st_rasterclip.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -{ - "id": "st_rasterclip", - "title": "ST_RasterClip", - "type": "scalar_function", - "signatures": [ - { - "returns": "RASTER", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "geometry", - "type": "GEOMETRY" - }, - { - "name": "options", - "type": "VARCHAR[]" - } - ] - } - ], - "aliases": [], - "summary": "Returns a raster that is clipped by the input geometry", - "see_also": [ "ST_RasterWarp" ], - "tags": [ "construction" ] -} ---- - -### Description - -Returns a raster that is clipped by the input geometry. - -`options` is optional, an array of parameters like [GDALWarp](https://gdal.org/programs/gdalwarp.html). - -### Examples - -```sql -WITH __input AS ( - SELECT - ST_RasterFromFile(file) AS raster - FROM - glob('./test/data/mosaic/SCL.tif-land-clip00.tiff') -), -__geometry AS ( - SELECT geom FROM ST_Read('./test/data/mosaic/CATAST_Pol_Township-PNA.gpkg') -) -SELECT - ST_RasterClip(mosaic, - (SELECT geom FROM __geometry LIMIT 1), - options => - [ - '-r', 'bilinear', '-crop_to_cutline', '-wo', 'CUTLINE_ALL_TOUCHED=TRUE' - ] - ) AS clip -FROM - __input -; -``` diff --git a/docs/src/functions/scalar/st_rasterfromfile.md b/docs/src/functions/scalar/st_rasterfromfile.md deleted file mode 100644 index 50e8f518..00000000 --- a/docs/src/functions/scalar/st_rasterfromfile.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -{ - "id": "st_rasterfromfile", - "title": "ST_RasterfromFile", - "type": "scalar_function", - "signatures": [ - { - "returns": "RASTER", - "parameters": [ - { - "name": "file", - "type": "VARCHAR" - } - ] - } - ], - "aliases": [], - "summary": "Loads a raster from a file path", - "see_also": [ ], - "tags": [ "construction" ] -} ---- - -### Description - -Loads a raster from a file path. - -### Examples - -```sql -WITH __input AS ( - SELECT - ST_RasterFromFile(file) AS raster - FROM - glob('./test/data/mosaic/*.tiff') -) -SELECT raster from __input; -``` diff --git a/docs/src/functions/scalar/st_rastertoworldcoord.md b/docs/src/functions/scalar/st_rastertoworldcoord.md deleted file mode 100644 index 9408c451..00000000 --- a/docs/src/functions/scalar/st_rastertoworldcoord.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -{ - "id": "st_rastertoworldcoord", - "title": "ST_RasterToWorldCoord", - "type": "scalar_function", - "signatures": [ - { - "returns": "POINT_2D", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "col", - "type": "INT" - }, - { - "name": "row", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the upper left corner as geometric X and Y (longitude and latitude) given a column and row", - "see_also": [ "ST_RasterToWorldCoordX", "ST_RasterToWorldCoordY" ], - "tags": [ "position" ] -} ---- - -### Description - -Returns the upper left corner as geometric X and Y (longitude and latitude) given a column and row. -Returned X and Y are in geometric units of the georeferenced raster. - -### Examples - -```sql -SELECT ST_RasterToWorldCoord(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_rastertoworldcoordx.md b/docs/src/functions/scalar/st_rastertoworldcoordx.md deleted file mode 100644 index 6249c001..00000000 --- a/docs/src/functions/scalar/st_rastertoworldcoordx.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -{ - "id": "st_rastertoworldcoordx", - "title": "ST_RasterToWorldCoordX", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "col", - "type": "INT" - }, - { - "name": "row", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the upper left X coordinate of a raster column row in geometric units of the georeferenced raster", - "see_also": [ "ST_RasterToWorldCoord", "ST_RasterToWorldCoordY" ], - "tags": [ "position" ] -} ---- - -### Description - -Returns the upper left X coordinate of a raster column row in geometric units of the georeferenced raster. -Returned X is in geometric units of the georeferenced raster. - -### Examples - -```sql -SELECT ST_RasterToWorldCoordX(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_rastertoworldcoordy.md b/docs/src/functions/scalar/st_rastertoworldcoordy.md deleted file mode 100644 index 608c0138..00000000 --- a/docs/src/functions/scalar/st_rastertoworldcoordy.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -{ - "id": "st_rastertoworldcoordy", - "title": "ST_RasterToWorldCoordY", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "col", - "type": "INT" - }, - { - "name": "row", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the upper left Y coordinate of a raster column row in geometric units of the georeferenced raster.", - "see_also": [ "ST_RasterToWorldCoord", "ST_RasterToWorldCoordX" ], - "tags": [ "position" ] -} ---- - -### Description - -Returns the upper left Y coordinate of a raster column row in geometric units of the georeferenced raster. -Returned Y is in geometric units of the georeferenced raster. - -### Examples - -```sql -SELECT ST_RasterToWorldCoordY(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_rasterwarp.md b/docs/src/functions/scalar/st_rasterwarp.md deleted file mode 100644 index c8a63ffd..00000000 --- a/docs/src/functions/scalar/st_rasterwarp.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -{ - "id": "st_rasterwarp", - "title": "ST_RasterWarp", - "type": "scalar_function", - "signatures": [ - { - "returns": "RASTER", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "options", - "type": "VARCHAR[]" - } - ] - } - ], - "aliases": [], - "summary": "Performs mosaicing, reprojection and/or warping on a raster", - "see_also": [ "ST_RasterClip" ], - "tags": [ "construction" ] -} ---- - -### Description - -Performs mosaicing, reprojection and/or warping on a raster. - -`options` is optional, an array of parameters like [GDALWarp](https://gdal.org/programs/gdalwarp.html). - -### Examples - -```sql -WITH __input AS ( - SELECT - raster - FROM - ST_ReadRaster('./test/data/mosaic/SCL.tif-land-clip00.tiff') -), -SELECT - ST_RasterWarp(raster, options => ['-r', 'bilinear', '-tr', '40.0', '40.0']) AS warp -FROM - __input -; -``` diff --git a/docs/src/functions/scalar/st_scalex.md b/docs/src/functions/scalar/st_scalex.md deleted file mode 100644 index a70dde51..00000000 --- a/docs/src/functions/scalar/st_scalex.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -{ - "id": "st_scalex", - "title": "ST_ScaleX", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the X component of the pixel width in units of coordinate reference system", - "see_also": [ "st_scaley" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the X component of the pixel width in units of coordinate reference system. -Refer to [World File](https://en.wikipedia.org/wiki/World_file) for more details. - -### Examples - -```sql -SELECT ST_ScaleX(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_scaley.md b/docs/src/functions/scalar/st_scaley.md deleted file mode 100644 index 6566e4dc..00000000 --- a/docs/src/functions/scalar/st_scaley.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -{ - "id": "st_scaley", - "title": "ST_ScaleY", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the Y component of the pixel width in units of coordinate reference system", - "see_also": [ "st_scalex" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the Y component of the pixel width in units of coordinate reference system. -Refer to [World File](https://en.wikipedia.org/wiki/World_file) for more details. - -### Examples - -```sql -SELECT ST_ScaleY(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_skewx.md b/docs/src/functions/scalar/st_skewx.md deleted file mode 100644 index c5850091..00000000 --- a/docs/src/functions/scalar/st_skewx.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -{ - "id": "st_skewx", - "title": "ST_SkewX", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the georeference X skew (or rotation parameter) of the raster", - "see_also": [ "st_skewy" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the georeference X skew (or rotation parameter). -Refer to [World File](https://en.wikipedia.org/wiki/World_file) for more details. - -### Examples - -```sql -SELECT ST_SkewX(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_skewy.md b/docs/src/functions/scalar/st_skewy.md deleted file mode 100644 index bdaa8c88..00000000 --- a/docs/src/functions/scalar/st_skewy.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -{ - "id": "st_skewy", - "title": "ST_SkewY", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the georeference Y skew (or rotation parameter) of the raster", - "see_also": [ "st_skewx" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the georeference Y skew (or rotation parameter). -Refer to [World File](https://en.wikipedia.org/wiki/World_file) for more details. - -### Examples - -```sql -SELECT ST_SkewY(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_srid.md b/docs/src/functions/scalar/st_srid.md deleted file mode 100644 index 95debcfc..00000000 --- a/docs/src/functions/scalar/st_srid.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -{ - "id": "st_srid", - "title": "ST_SRID", - "type": "scalar_function", - "signatures": [ - { - "returns": "INT", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the spatial reference identifier of the raster", - "see_also": [ "st_getgeometry" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the spatial reference identifier (EPSG code) of the raster. -Refer to [EPSG](https://spatialreference.org/ref/epsg/) for more details. - -### Examples - -```sql -SELECT ST_SRID(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_upperleftx.md b/docs/src/functions/scalar/st_upperleftx.md deleted file mode 100644 index 2bf7cd39..00000000 --- a/docs/src/functions/scalar/st_upperleftx.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -{ - "id": "st_upperleftx", - "title": "ST_UpperLeftX", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the upper left X coordinate of raster in projected spatial reference", - "see_also": [ "ST_UpperLeftY" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the upper left X coordinate of raster in projected spatial reference. - -### Examples - -```sql -SELECT ST_UpperLeftX(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_upperlefty.md b/docs/src/functions/scalar/st_upperlefty.md deleted file mode 100644 index da8c25cf..00000000 --- a/docs/src/functions/scalar/st_upperlefty.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -{ - "id": "st_upperlefty", - "title": "ST_UpperLeftY", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the upper left Y coordinate of raster in projected spatial reference", - "see_also": [ "ST_UpperLeftX" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the upper left Y coordinate of raster in projected spatial reference. - -### Examples - -```sql -SELECT ST_UpperLeftY(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_value.md b/docs/src/functions/scalar/st_value.md deleted file mode 100644 index 0de2ddc3..00000000 --- a/docs/src/functions/scalar/st_value.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -{ - "id": "st_value", - "title": "ST_Value", - "type": "scalar_function", - "signatures": [ - { - "returns": "DOUBLE", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "bandnum", - "type": "INT" - }, - { - "name": "col", - "type": "INT" - }, - { - "name": "row", - "type": "INT" - } - ] - } - ], - "aliases": [], - "summary": "Returns the value of a given band in a given column, row pixel", - "see_also": [ ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the value of a given band in a given column, row pixel. -Band numbers start at 1 and band is assumed to be 1 if not specified. - -### Examples - -```sql -SELECT ST_Value(raster, 1, 0, 0) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_width.md b/docs/src/functions/scalar/st_width.md deleted file mode 100644 index 6c15ffe8..00000000 --- a/docs/src/functions/scalar/st_width.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -{ - "id": "st_width", - "title": "ST_Width", - "type": "scalar_function", - "signatures": [ - { - "returns": "INT", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - } - ] - } - ], - "aliases": [], - "summary": "Returns the width of the raster in pixels", - "see_also": [ "st_height" ], - "tags": [ "property" ] -} ---- - -### Description - -Returns the width of the raster in pixels. - -### Examples - -```sql -SELECT ST_Width(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_worldtorastercoord.md b/docs/src/functions/scalar/st_worldtorastercoord.md deleted file mode 100644 index 92909b47..00000000 --- a/docs/src/functions/scalar/st_worldtorastercoord.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -{ - "id": "st_worldtorastercoord", - "title": "ST_WorldToRasterCoord", - "type": "scalar_function", - "signatures": [ - { - "returns": "RASTER_COORD", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "x", - "type": "DOUBLE" - }, - { - "name": "y", - "type": "DOUBLE" - } - ] - } - ], - "aliases": [], - "summary": "Returns the upper left corner as column and row given geometric X and Y (longitude and latitude)", - "see_also": [ "ST_WorldToRasterCoordX", "ST_WorldToRasterCoordY" ], - "tags": [ "position" ] -} ---- - -### Description - -Returns the upper left corner as column and row given geometric X and Y (longitude and latitude). -Geometric X and Y must be expressed in the spatial reference coordinate system of the raster. - -### Examples - -```sql -SELECT ST_WorldToRasterCoord(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_worldtorastercoordx.md b/docs/src/functions/scalar/st_worldtorastercoordx.md deleted file mode 100644 index 462b7f28..00000000 --- a/docs/src/functions/scalar/st_worldtorastercoordx.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -{ - "id": "st_worldtorastercoordx", - "title": "ST_WorldToRasterCoordX", - "type": "scalar_function", - "signatures": [ - { - "returns": "INT", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "x", - "type": "DOUBLE" - }, - { - "name": "y", - "type": "DOUBLE" - } - ] - } - ], - "aliases": [], - "summary": "Returns the column in the raster given geometric X and Y (longitude and latitude)", - "see_also": [ "ST_WorldToRasterCoord", "ST_WorldToRasterCoordY" ], - "tags": [ "position" ] -} ---- - -### Description - -Returns the column in the raster given geometric X and Y (longitude and latitude). -Geometric X and Y must be expressed in the spatial reference coordinate system of the raster. - -### Examples - -```sql -SELECT ST_WorldToRasterCoordX(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/functions/scalar/st_worldtorastercoordy.md b/docs/src/functions/scalar/st_worldtorastercoordy.md deleted file mode 100644 index 30406430..00000000 --- a/docs/src/functions/scalar/st_worldtorastercoordy.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -{ - "id": "st_worldtorastercoordy", - "title": "ST_WorldToRasterCoordY", - "type": "scalar_function", - "signatures": [ - { - "returns": "INT", - "parameters": [ - { - "name": "raster", - "type": "RASTER" - }, - { - "name": "x", - "type": "DOUBLE" - }, - { - "name": "y", - "type": "DOUBLE" - } - ] - } - ], - "aliases": [], - "summary": "Returns the row in the raster given geometric X and Y (longitude and latitude)", - "see_also": [ "ST_WorldToRasterCoord", "ST_WorldToRasterCoordX" ], - "tags": [ "position" ] -} ---- - -### Description - -Returns the row in the raster given geometric X and Y (longitude and latitude). -Geometric X and Y must be expressed in the spatial reference coordinate system of the raster. - -### Examples - -```sql -SELECT ST_WorldToRasterCoordY(raster) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; -``` diff --git a/docs/src/types/raster.md b/docs/src/types/raster.md deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/st_read_raster.md b/docs/st_read_raster.md deleted file mode 100644 index 9caa72a8..00000000 --- a/docs/st_read_raster.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -{ - "type": "table_function", - "title": "ST_ReadRaster", - "id": "st_readraster", - "signatures": [ - { - "parameters": [ - { - "name": "path", - "type": "VARCHAR" - }, - { - "name": "open_options", - "type": "VARCHAR[]" - }, - { - "name": "allowed_drivers", - "type": "VARCHAR[]" - }, - { - "name": "sibling_files", - "type": "VARCHAR[]" - } - ] - } - ], - "summary": "Loads a raster from a file path", - "tags": [] -} ---- - -### Description - - -The `ST_ReadRaster` table function is based on the [GDAL](https://gdal.org/index.html) translator library and enables reading spatial data from a variety of geospatial raster file formats as if they were DuckDB tables. - -> See [ST_Drivers](##st_drivers) for a list of supported file formats and drivers. - -Except for the `path` parameter, all parameters are optional. - -| Parameter | Type | Description | -| --------- | -----| ----------- | -| `path` | VARCHAR | The path to the file to read. Mandatory | -| `open_options` | VARCHAR[] | A list of key-value pairs that are passed to the GDAL driver to control the opening of the file. | -| `allowed_drivers` | VARCHAR[] | A list of GDAL driver names that are allowed to be used to open the file. If empty, all drivers are allowed. | -| `sibling_files` | VARCHAR[] | A list of sibling files that are required to open the file. E.g., the ESRI Shapefile driver requires a .shx file to be present. Although most of the time these can be discovered automatically. | - -Note that GDAL is single-threaded, so this table function will not be able to make full use of parallelism. - -### Examples - -```sql --- Read a GeoTIFF -SELECT * FROM ST_ReadRaster('some/file/path/filename.tiff'); -``` - -### Replacement scans - -By using `ST_ReadRaster`, the spatial extension also provides “replacement scans” for common raster file formats, allowing you to query files of these formats as if they were tables directly. - -```sql -SELECT * FROM './path/to/some/shapefile/dataset.tiff'; -``` - -In practice this is just syntax-sugar for calling ST_ReadRaster, so there is no difference in performance. If you want to pass additional options, you should use the ST_ReadRaster table function directly. - -The following formats are currently recognized by their file extension: - -| Format | Extension | -| ------ | --------- | -| GeoTiff COG | .tif, .tiff | -| Erdas Imagine | .img | -| GDAL Virtual | .vrt | diff --git a/docs/st_read_raster_meta.md b/docs/st_read_raster_meta.md deleted file mode 100644 index 85f2ff75..00000000 --- a/docs/st_read_raster_meta.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -{ - "type": "table_function", - "title": "ST_ReadRaster_Meta", - "id": "st_readraster_meta", - "signatures": [ - { - "parameters": [ - { - "name": "file", - "type": "VARCHAR" - } - ] - }, - { - "parameters": [ - { - "name": "files", - "type": "VARCHAR[]" - } - ] - } - ], - "summary": "Read metadata from a variety of raster data sources", - "tags": [] -} ---- - -### Description - -The `ST_Read_Meta` table function accompanies the [ST_ReadRaster](#st_readraster) table function, but instead of reading the contents of a file, this function scans the metadata instead. - -### Examples - -```sql -SELECT - driver_short_name, - driver_long_name, - upper_left_x, - upper_left_y, - width, - height, - scale_x, - scale_y, - skew_x, - skew_y, - srid, - num_bands -FROM - ST_ReadRaster_Meta('./test/data/mosaic/SCL.tif-land-clip00.tiff') -; -``` - -``` -┌───────────────────┬──────────────────┬──────────────┬──────────────┬───────┬────────┬─────────┬─────────┬────────┬────────┬───────┬───────────┐ -│ driver_short_name │ driver_long_name │ upper_left_x │ upper_left_y │ width │ height │ scale_x │ scale_y │ skew_x │ skew_y │ srid │ num_bands │ -│ varchar │ varchar │ double │ double │ int32 │ int32 │ double │ double │ double │ double │ int32 │ int32 │ -├───────────────────┼──────────────────┼──────────────┼──────────────┼───────┼────────┼─────────┼─────────┼────────┼────────┼───────┼───────────┤ -│ GTiff │ GeoTIFF │ 541020.0 │ 4796640.0 │ 3438 │ 5322 │ 20.0 │ -20.0 │ 0.0 │ 0.0 │ 32630 │ 1 │ -└───────────────────┴──────────────────┴──────────────┴──────────────┴───────┴────────┴─────────┴─────────┴────────┴────────┴───────┴───────────┘ - -```