sql_reference_list
Not logged in

Back to RasterLite2 doc index



RasterLite2 v.1.1.0 SQL functions - reference list


Table of Contents

SQL functions supporting Version and Architecture
SQL functions testing which codecs are actually supported by the library
SQL functions controlling parallel execution
SQL functions controlling WMS requests
SQL functions controlling the standard PDF page format
SQL functions controlling Text Symbolizers (Map Labels)
SQL functions supporting BLOB serialized Pixel objects
SQL functions supporting BLOB serialized Palette objects
SQL functions supporting BLOB serialized Font objects
SQL functions supporting BLOB serialized Raster/Band Statistics objects
SQL functions supporting BLOB serialized rasterTile objects
SQL functions supporting Coverage and Section management
SQL functions supporting Pyramid management
SQL functions returning styled Maps
SQL functions importing raster data from external datasources
SQL functions exporting raw raster data to external files (Coverage oriented)
SQL functions exporting raw raster data to external files (Section oriented)
SQL functions supporting Vector Draping

Last update: 2021-07-24



SQL functions supporting Version and Architecture

SyntaxSummary
RL2_Version () : String Will return the version of RasterLite2 currently in use.
RL2_Target_CPU () : String Will return the name of the CPU architecture currently in use.
RL2_Cairo_Version () : String Will return the version of libcairo currently in use.
RL2_Curl_Version () : String Will return the version of libcurl currently in use.
RL2_Zlib_Version () : String Will return the version of zlib (DEFLATE) currently in use.
RL2_LZMA_Version () : String Will return the version of liblzma currently in use.
RL2_LZ4_Version () : String Will return the version of liblz4 currently in use.
RL2_ZSTD_Version () : String Will return the version of libzstd currently in use.
RL2_PNG_Version () : String Will return the version of libpng currently in use.
RL2_JPEG_Version () : String Will return the version of libjpeg (or libjpeg-turbo) currently in use.
RL2_TIFF_Version () : String Will return the version of libtiff currently in use.
RL2_GeoTIFF_Version () : String Will return the version of libgeotiff currently in use.
RL2_WEBP_Version () : String Will return the version of libwebp currently in use.
RL2_OpenJPEG_Version () : String Will return the version of libopenjp2 (Jpeg2000) currently in use.
RL2_Leptonica_Version () : String Will return the version of Leptonica currently in use.

Back to the main Index of RL2 SQL Functions


SQL functions testing which codecs are actually supported by the library

SyntaxSummary
RL2_has_codec_none () : Boolean Tests if the NONE codec is currently supported.
Will costantly return 1 (TRUE).
RL2_has_codec_deflate () : Boolean Tests if the DEFLATE (zip: with Delta Filter) codec is currently supported.
Will costantly return 1 (TRUE).
RL2_has_codec_deflate_no () : Boolean Tests if the DEFLATE_NO (zip: without Delta Filter) codec is currently supported.
Will costantly return 1 (TRUE).
RL2_has_codec_lzma () : Boolean Tests if the LZMA (7-zip: with Delta Filter) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_lzma_no () : Boolean Tests if the LZMA_NO (7-zip: without Delta Filter) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_lz4 () : Boolean Tests if the LZ4 (fast lossless: with Delta Filter) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_lz4_no () : Boolean Tests if the LZ4_NO (fast loseless: without Delta Filter) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_zstd () : Boolean Tests if the ZSTD (Zstandard: with Delta Filter) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_zstd_no () : Boolean Tests if the ZSTD_NO (Zstandard: without Delta Filter) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_png () : Boolean Tests if the PNG codec is currently supported.
Will costantly return 1 (TRUE).
RL2_has_codec_jpeg () : Boolean Tests if the JPEG codec is currently supported.
Will costantly return 1 (TRUE).
RL2_has_codec_fax4 () : Boolean Tests if the FAX4 codec is currently supported.
Will costantly return 1 (TRUE).
RL2_has_codec_webp () : Boolean Tests if the WebP (lossy) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_ll_webp () : Boolean Tests if the WebP (lossless) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_jp2 () : Boolean Tests if the OpenJpeg (Jpeg2000 lossy) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_codec_ll_jp2 () : Boolean Tests if the OpenJpeg (Jpeg2000 lossless) codec is currently supported.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.
RL2_has_leptonica () : Boolean Tests if Leptonica support is currently available.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual configuration.

Back to the main Index of RL2 SQL Functions


SQL functions controlling parallel execution

SyntaxSummary
RL2_GetMaxThreads () : Integer Will return the currently set MAX number of concurrent threads allowed for parallel execution.
RL2_SetMaxThreads ( max Integer ) : Integer Will set the MAX number of concurrent threads allowed for parallel execution.
Will return the MAX number of concurrent threads after this call.

Note

The MAX number of concurrent threads is a global option set at the DB connection level.
Once set, it will influence any subsequent call to any SQL function supporting parallel execution.
The initial value for any new connection is always 0, that is no parallel execution at all.

Back to the main Index of RL2 SQL Functions


SQL functions controlling WMS requests

SyntaxSummary
RL2_GetMaxWmsRetries () : Integer Will return the currently set MAX number of retries allowed for for each failing WMS request.
RL2_SetMaxWmsRetries ( max Integer ) : Integer Will set the MAX number of retries allowed for each failing WMS request.
Will return the MAX number of WMS retries after this call.
RL2_GetWmsPause () : Integer Will return the currently set pause time (expressed in milliseconds) between a failing WMS request and the next retry.
RL2_SetWmsPause ( millis Integer ) : Integer Will set the pause time (expressed in milliseconds) between a failing WMS request and the next retry.
Will return the pause time after this call.

Note

The WMS options are global optiosn set at the DB connection level.
Once set, they will influence any subsequent call to any SQL function performing WMS requests either directly or indirectly.
The initial default values for any new connection are:
  • Max retries: 5
  • Pause: 5 milliseconds

Back to the main Index of RL2 SQL Functions


SQL functions controlling the standard PDF page format

SyntaxSummary
RL2_GetPdfMarginUOM () : String Will return the currently set Unit Of Measure for PDF page dimensions. Valid values are:
  • mm millimeters
  • in inches
RL2_SetPdfMarginUOM ( uom String ) : Integer Will set the Unit Of Measure for PDF page dimensions. Valid values are:
  • mm millimeters
  • in inches
.
Will return the PDF page UOM after this call.
RL2_GetPdfMarginsHorz () : Integer Will return the currently set horizontal margin (both left and right) measured in the currently set UOM.
RL2_SetPdfMarginHorz ( size Integer ) : Integer Will set the horizontal margin (both left and right) measured in the currently set UOM.
Will return the vertical margin size after this call.
RL2_GetPdfMarginsVert () : Integer Will return the currently set vertical margin (both upper and lower) measured in the currently set UOM.
RL2_SetPdfMarginVert ( size Integer ) : Integer Will set the vertical margin (both upper and lower) measured in the currently set UOM.
Will return the vertical margin size after this call.
RL2_GetPdfPaperFormat () : String Will return the currently set PDF page format. Valid values are A0, A1, A2, A3, A4 and A5
RL2_SetPdfPaperFormat ( format String ) : Integer Will set the PDF page format. Valid values are A0, A1, A2, A3, A4 and A5.
Will return the PDF page format after this call.
RL2_GetPdfDPI () : Integer Will return the currently set Dots Per Inch resolution. Valid values are 72, 150, 300 and 600.
RL2_SetPdfDPI ( dpi Integer ) : Integer Will set the Dots Per Inch resolution. Valid values are 72, 150, 300 and 600
Will return the currently set DPI after this call.
RL2_GetPdfOrientation () : String Will return the currently set PDF page orientation. Valid values are Portrait or Landscape.
RL2_SetPdfOrientation ( format String ) : Integer Will set the PDF page orientation. Valid values are Portrait or Landscape.
Will return the PDF page orientation after this call.

Note

The PDF page setting are global options set at the DB connection level.
Once set, they will influence any subsequent call to any SQL function generating a PDF output.
The initial values for any new connection are:
  • Page format: A4
  • Page orientation: Portrait
  • DPI: 300
  • Horizontal and Vertical margins: 0.5 inches
  • UOM: inches
.

Back to the main Index of RL2 SQL Functions


SQL functions controlling Text Symbolizers (Map Labels)

SyntaxSummary
RL2_IsAntiLabelCollisionEnabled () : Boolean Tests if the AntiLabelCollision global option is currently activated or not.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual setting.
RL2_EnableAntiLabelCollision () : Boolean Activates the AntiLabelCollision global option.
Same return value as in RL2_IsAntiLabelCollisionEnabled()
RL2_DisableAntiLabelCollision () : Boolean Deactivates the AntiLabelCollision global option.
Same return value as in RL2_IsAntiLabelCollisionEnabled()
RL2_IsLabelWrapTextEnabled () : Boolean Tests if the LabelWrapText global option is currently activated or not.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual setting.
RL2_EnableLabelWrapText () : Boolean Activates the LabelWrapText global option.
Same return value as in RL2_IsLabelWrapTextEnabled()
RL2_DisableLabelWrapText () : Boolean Deactivates the LabelWrapText global option.
Same return value as in RL2_IsLabelWrapTextEnabled()
RL2_IsLabelAutorotateEnabled () : Boolean Tests if the LabelAutorotate global option is currently activated or not.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual setting.
RL2_EnableLabelAutorotate () : Boolean Activates the LabelAutorotate global option.
Same return value as in RL2_IsLabelAutorotateEnabled()
RL2_DisableLabelAutorotate () : Boolean Deactivates the LabelAutorotate global option.
Same return value as in RL2_IsLabelAutorotateEnabled()
RL2_IsLabelShifPositionEnabled () : Boolean Tests if the LabelShifPosition global option is currently activated or not.
Will return 1 (TRUE) or 0 (FALSE) accordingly to actual setting.
RL2_EnableLabelShifPosition () : Boolean Activates the LabelShifPosition global option.
Same return value as in RL2_IsLabelShifPositionEnabled()
RL2_DisableLabelShifPosition () : Boolean Deactivates the LabelShifPosition global option.
Same return value as in RL2_IsLabelShifPositionEnabled()

Note

All the above global options are set at the DB connection level.
Once set, each one of them will influence any subsequent call to any SQL function supporting Text Symbolizers.
The initial value for any new connection is always 0 for all them, that is no special Text/Label options at all.

Back to the main Index of RL2 SQL Functions


SQL functions supporting BLOB serialized Pixel objects

SyntaxSummary
RL2_IsValidPixel ( pixel BLOB , sampleType String , numBands Integer ) : Integer Will test a BLOB serialized pixel object.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_IsPixelNone ( pixel BLOB ) : Integer Will test a BLOB serialized pixel object returning 1 (TRUE) if it corresponds to NONE (aka NODATA) or 0 (FALSE) if not.
-1 on invalid arguments or if any error occurred.
RL2_CreatePixel ( sampleType String , pixelType String , numBands Integer ) : BLOB Will return a BLOB corresponding to a Pixel serialized object: NULL will be returned on invalid arguments or if any error occurred.
All Pixel components will be initially set to ZERO.
RL2_CreatePixelNone () : BLOB Will return a BLOB corresponding to a Pixel serialized object of the NONE aka NODATA type: NULL will be returned on invalid arguments or if any error occurred.
RL2_GetPixelType ( pixel BLOB ) : String Will return the mnemonic PixelType from a Pixel serialized object: NULL will be returned on invalid arguments or if any error occurred.
RL2_GetPixelSampleType ( pixel BLOB ) : String Will return the mnemonic SampleType from a Pixel serialized object: NULL will be returned on invalid arguments or if any error occurred.
RL2_GetPixelNumBands ( pixel BLOB ) : Integer Will return the number of Bands from a Pixel serialized object: NULL will be returned on invalid arguments or if any error occurred.
RL2_GetPixelValue ( pixel BLOB , bandIndex Integer ) : Integer

RL2_GetPixelValue ( pixel BLOB , bandIndex Integer ) : Double
Will return the current sampleValue (data-type will match the Pixel's sampleType) from a Pixel serialized object: NULL will be returned on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO.
RL2_SetPixelValue ( pixel BLOB , bandIndex Integer , sampleValue Integer ) : BLOB

RL2_SetPixelValue ( pixel BLOB , bandIndex Integer , sampleValue Double ) : BLOB
Will return a new BLOB corresponding to a Pixel serialized object supporting the requested sampleValue (which is expected to respect the precision declared by the sampleType): NULL will be returned on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO.
RL2_IsTransparentPixel ( pixel BLOB ) : Integer Will test a BLOB serialized pixel object for transparency.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_IsOpaquePixel ( pixel BLOB ) : Integer Will test a BLOB serialized pixel object for opacity.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_SetTransparentPixel ( pixel BLOB ) : BLOB Will return a new BLOB corresponding to a transparent Pixel serialized object: NULL will be returned on invalid arguments or if any error occurred.
RL2_SetOpaquePixel ( pixel BLOB ) : BLOB Will return a new BLOB corresponding to an opaque Pixel serialized object: NULL will be returned on invalid arguments or if any error occurred.
RL2_PixelEquals ( pixel_1 BLOB , pixel_2 BLOB ) : Integer Will compare two BLOB serialized pixel objects for identity.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_GetPixelFromRasterByPoint ( db_prefix Text , coverage Text , point BLOB-Geom , pyramyd_level Integer ) : BLOB-Pixel

RL2_GetPixelFromRasterByPoint ( db_prefix Text , coverage Text , point BLOB-Geom , horz_res Double/i> , vert_res Double ) : BLOB-Pixel
Will extract from the Raster Coverage identified by db_prefix and coverage the pixel matching the map coordinates specified by point:
  • a NULL db_prefix will be automatically interpreted as 'MAIN'.
  • the point Geometry must identify a single POINT.
    If the SRID declared by point isn't the same declared by the Raster Coverage then point will be automatically reprojected into the Raster Coverage own SRID.

Will return a BLOB serialized pixel object or NULL on invalid arguments or if any error occurred.

Back to the main Index of RL2 SQL Functions


SQL functions supporting BLOB serialized Palette objects

SyntaxSummary
RL2_IsValidRasterPalette ( palette BLOB , sampleType String ) : Integer Will test a BLOB serialized palette object for validity.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_GetPaletteNumEntries ( palette BLOB ) : Integer Will return the number of color entries from a Palette serialized object: NULL will be returned on invalid arguments or if any error occurred.
RL2_GetPaletteColorEntry ( palette BLOB , entryIndex Integer ) : String Will return the current color (HEX-RGB format) from a serialized Palette object Entry: NULL will be returned on invalid arguments or if any error occurred.
Please note: the first Palette Entry always corresponds to index ZERO.
RL2_SetPaletteColorEntry ( palette BLOB , entryIndex Integer , hexRgbColor String ) : BLOB Will return a new BLOB corresponding to a Palette serialized object supporting the changed color Entry. The color is expected to be expressed in the canonical WEB HEX-RGB form, as in '#ff8080'.
NULL will be returned on invalid arguments or if any error occurred.
Please note: the first Palette Entry always corresponds to index ZERO.
RL2_PaletteEquals ( palette_1 BLOB , palette_2 BLOB ) : Integer Will compare two BLOB serialized palette objects for identity.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.

Back to the main Index of RL2 SQL Functions


SQL functions supporting BLOB serialized Font objects

SyntaxSummary
RL2_LoadFontFromFile ( path String ) : Integer Will permanently store a new Font into the Database loading it from an external file.
Will return 1 (TRUE) on success or 0 (FALSE) on failure
-1 on invalid arguments or if any error occurred.
  • Any new font will always be loaded into the MAIN DB.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_ExportFontToFile ( db_prefix String , facename String , path String ) : Integer Will export a font contained within the Database into an external file.
Will return 1 (TRUE) on success or 0 (FALSE) on failure
-1 on invalid arguments or if any error occurred.
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Font corresponding to facename is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_IsValidFont ( font BLOB ) : Integer Will test a BLOB serialized font object for validity.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_CheckFontFacename ( facename String , font BLOB ) : Integer Will check if a BLOB serialized font object corresponds to the given facename.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_GetFontFamily ( font BLOB ) : String Will return the family name (as e.g. Roboto) from a valid BLOB serialized font object.
Will return NULL on invalid arguments or if any error occurred.
RL2_GetFontFacename ( font BLOB ) : String Will return the facename (as e.g. Roboto-BoldItalic) from a valid BLOB serialized font object.
Will return NULL on invalid arguments or if any error occurred.
RL2_IsFontBold ( font BLOB ) : Integer Will test a valid BLOB serialized font object determining if it has the Bold style.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_IsFontItalic ( font BLOB ) : Integer Will test a valid BLOB serialized font object determining if it has the Italic style.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.

Back to the main Index of RL2 SQL Functions


SQL functions supporting BLOB serialized Raster/Band Statistics objects

SyntaxSummary
RL2_IsValidRasterStatistics ( dbPrefix String , coverageName String , rasterStatistics BLOB ) : Integer

RL2_IsValidRasterStatistics ( rasterStatistics BLOB , sampleType String , numBands Integer ) : Integer
Will test a BLOB serialized rasterStatistics object for validity.
The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_GetRasterStatistics_NoDataPixelsCount ( rasterStatistics BLOB ) : Integer Will return the total count of NoData pixels from a BLOB serialized rasterStatistics object: NULL on invalid arguments or if any error occurred.
RL2_GetRasterStatistics_ValidPixelsCount ( rasterStatistics BLOB ) : Integer Will return the total count of valid pixels (excluding NoData pixels) from a BLOB serialized rasterStatistics object: NULL on invalid arguments or if any error occurred.
RL2_GetRasterStatistics_SampleType ( rasterStatistics BLOB ) : String Will return the mnemonic SampleType from a rasterStatistics serialized object: NULL on invalid arguments or if any error occurred.
RL2_GetRasterStatistics_BandsCount ( rasterStatistics BLOB ) : String Will return the total number of supported Bands from a rasterStatistics serialized object: NULL on invalid arguments or if any error occurred.
RL2_GetBandStatistics_Min ( rasterStatistics BLOB , bandIndex Integer ) : Double Will return the Minimum value from a specific Band of a rasterStatistics serialized object: NULL on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO.
RL2_GetBandStatistics_Max ( rasterStatistics BLOB , bandIndex Integer ) : Double Will return the Maximum value from a specific Band of a rasterStatistics serialized object: NULL on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO.
RL2_GetBandStatistics_Avg ( rasterStatistics BLOB , bandIndex Integer ) : Double Will return the Average/Mean value from a specific Band of a rasterStatistics serialized object: NULL on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO.
RL2_GetBandStatistics_Var ( rasterStatistics BLOB , bandIndex Integer ) : Double Will return the estimated Variance value from a specific Band of a rasterStatistics serialized object: NULL on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO.
RL2_GetBandStatistics_StdDev ( rasterStatistics BLOB , bandIndex Integer ) : Double Will return the estimated Standard Deviation value from a specific Band of a rasterStatistics serialized object: NULL on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO.
RL2_GetBandStatistics_Histogram ( rasterStatistics BLOB , bandIndex Integer ) : BLOB Will return a BLOB corresponding to a PNG image representing the estimated distribution Histogram from a specific Band of a rasterStatistics serialized object: NULL on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO.
RL2_GetBandHistogramFromImage ( image BLOB , mime_type String , bandIndex Integer ) : BLOB Will return a BLOB corresponding to a PNG image representing the estimated distribution Histogram from a specific Band of an image encoded as PNG or JPEG: NULL on invalid arguments or if any error occurred.
Please note: the first Band always corresponds to index ZERO
Valid mime-types are image/png or image/jpeg.

Back to the main Index of RL2 SQL Functions


SQL functions supporting BLOB serialized rasterTile objects

SyntaxSummary
RL2_IsValidRasterTile ( dbPrefix String , coverageName String , pyramidLevel Integer, tileOdd BLOB , tileEven BLOB ) : Integer Will test a BLOB serialized rasterTile object for validity.
The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
Will return 1 (TRUE) or 0 (FALSE): or -1 on invalid arguments or if any error occurred.
RL2_GetTileImage ( dbPrefix String , coverageName String , tileID Integer ) : BLOB Will return a BLOB corresponding to a PNG image (visual preview) from a rasterTile serialized object: NULL on invalid arguments or if any error occurred.
The mandatory dbPrefix argument could eventually be NULL and in this case the MAIN DB will implicitly be assumed.
Please note: for pixelTypes lacking any implicit photometric interpretation (i.e. DATAGRID) a default Grayscale interpretation will be silently assumed. For Raster Tiles of the MULTIBAND type a default Grayscale interpretation of the first band only will be silently assumed.
RL2_GetTripleBandTileImage ( dbPrefix String , coverageName String , tileID Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer ) : BLOB

RL2_GetTripleBandTileImage ( dbPrefix String , coverageName String , tileID Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , bgColor String ) : BLOB

RL2_GetTripleBandTileImage ( dbPrefix String , coverageName String , tileID Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , bgColor String , transparent Integer ) : BLOB
Will return a BLOB corresponding to a PNG image (visual preview) from a rasterTile serialized object: NULL on invalid arguments or if any error occurred.
The mandatory dbPrefix argument could eventually be NULL and in this case the MAIN DB will implicitly be assumed.
The bandIndexRed, bandIndexGreen and bandIndexBlue arguments are intended to arbitrarily compose the RGB PNG starting from the Bands supported by the Coverage.
Please note: the first Band always corresponds to index ZERO

The optional bgColor argument is expected to be expressed in the canonical WEB HEX-RGB form, as in '#ff8080' (default is '#ffffff' i.e. full white).
The second optional transparent argument is expected to be expressed as a Boolean value (default is 0 FALSE).
Please note very well: this SQL function will only accept Raster Tiles of the MULTIBAND or RGB type.
RL2_GetMonoBandTileImage ( dbPrefix String , coverageName String , tileID Integer , bandIndexGray Integer ) : BLOB

RL2_GetMonoBandTileImage ( dbPrefix String , coverageName String , tileID Integer , bandIndexGray Integer , bgColor String ) : BLOB

RL2_GetMonoBandTileImage ( dbPrefix String , coverageName String , tileID Integer , bandIndexGray Integer , bgColor String , transparent Integer ) : BLOB
Will return a BLOB corresponding to a PNG image (visual preview) from a rasterTile serialized object: NULL on invalid arguments or if any error occurred.
The mandatory dbPrefix argument could eventually be NULL and in this case the MAIN DB will implicitly be assumed.
The bandIndexGray argument is intended to arbitrarily compose the Grayscale PNG starting from the Bands supported by the Coverage.
Please note: the first Band always corresponds to index ZERO

The optional bgColor argument is expected to be expressed in the canonical WEB HEX-RGB form, as in '#ff8080' (default is '#ffffff' i.e. full white).
The second optional transparent argument is expected to be expressed as a Boolean value (default is 0 FALSE).
Please note: for pixelTypes lacking any implicit photometric interpretation (i.e. DATAGRID) a default Grayscale interpretation will be silently assumed.
Please note very well: this SQL function will only accept Raster Tiles of the MULTIBAND or RGB type.

Back to the main Index of RL2 SQL Functions


SQL functions supporting Coverage and Section management

SyntaxSummary
RL2_CreateRasterCoverage ( coverageName String , sampleType String , pixelType String , numBands Integer , compressionType String , quality Integer , tileWidth Integer , tileHeight Integer , SRID Integer , pixelResolution Double ) : Integer

RL2_CreateRasterCoverage ( coverageName String , sampleType String , pixelType String , numBands Integer , compressionType String , quality Integer , tileWidth Integer , tileHeight Integer , SRID Integer , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_CreateRasterCoverage ( coverageName String , sampleType String , pixelType String , numBands Integer , compressionType String , quality Integer , tileWidth Integer , tileHeight Integer , SRID Integer , horzPixelResolution Double , vertPixelResolution Double , noDataPixel BLOB ) : Integer

RL2_CreateRasterCoverage ( coverageName String , sampleType String , pixelType String , numBands Integer , compressionType String , quality Integer , tileWidth Integer , tileHeight Integer , SRID Integer , horzPixelResolution Double , vertPixelResolution Double , noDataPixel BLOB , strictResolution Integer , mixedResolutions Integer , sectionPaths Integer , sectionMD5 Integer , sectionSummary Integer ) : Integer

RL2_CreateRasterCoverage ( coverageName String , sampleType String , pixelType String , numBands Integer , compressionType String , quality Integer , tileWidth Integer , tileHeight Integer , SRID Integer , horzPixelResolution Double , vertPixelResolution Double , noDataPixel BLOB , strictResolution Integer , mixedResolutions Integer , sectionPaths Integer , sectionMD5 Integer , sectionSummary Integer , is_queryable Integer ) : Integer

RL2_CreateRasterCoverage ( coverageName String , sampleType String , pixelType String , numBands Integer , compressionType String , quality Integer , tileWidth Integer , tileHeight Integer , SRID Integer , horzPixelResolution Double , vertPixelResolution Double , noDataPixel BLOB , strictResolution Integer , mixedResolutions Integer , sectionPaths Integer , sectionMD5 Integer , sectionSummary Integer , is_queryable Integer , is_opaque Integer ) : Integer

RL2_CreateRasterCoverage ( coverageName String , sampleType String , pixelType String , numBands Integer , compressionType String , quality Integer , tileWidth Integer , tileHeight Integer , SRID Integer , horzPixelResolution Double , vertPixelResolution Double , noDataPixel BLOB , strictResolution Integer , mixedResolutions Integer , sectionPaths Integer , sectionMD5 Integer , sectionSummary Integer , is_queryable Integer , is_opaque Integer , min_scale_denominator Double , max_scale_denominator Double ) : Integer
Will attempt to create a new Raster Coverage within the currently connected DB-file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note: you can use the second form to create a Raster Coverage requiring rectangular pixels.

The third form allows to explicitly declare a NoData value; in this case the last argument is expected to correspond to a Pixel serialized object exactly matching the Coverage's pixel model.

The fourth form allows to explicitly set Policies Options (always disabled by default). Each single Option corresponds to a boolean value (FALSE=disabled / TRUE=enabled).

The fifth form allows to explicitly state if the Coverage is queryable or not (always set to FALSE by default).

The sixth form allows to explicitly state if the Coverage is fully opaque even on the uncovered areas or not (always set to FALSE by default).

The seventh and final form allows to explicitly set the Coverage's Visibility Range:
  • min_scale_denominator sets the lower visibility limit: it can be legitimately be NULL thus meaning that no lower limit is defined (always set to NULL by default).
  • max_scale_denominator sets the upper visibility limit: it can be legitimately be NULL thus meaning that no upper limit is defined (always set to NULL by default).
  • Note: you can set the one or the other, or both or none, as more appropriate.
RL2_SetRasterCoverageInfos ( coverageName String , title String , abstract String ) : Integer

RL2_SetRasterCoverageInfos ( coverageName String , title String , abstract String , is_queryable Integer ) : Integer

RL2_SetRasterCoverageInfos ( coverageName String , title String , abstract String , is_queryable Integer , is_opaque Integer ) : Integer
Updates the descriptive infos associated to a Raster Coverage.
  • coverage_name must identify an existing Coverage.
  • title and abstract represent the descriptive infos to be set.
  • the optional argument is_queryable (expected to be of the Integer type) determines if the Coverage is queryable or not; if omitted or negative the Coverage will preserve the already defined value.
  • the optional argument is_opaque (expected to be of the Integer type) determines if the Coverage is fully opaque even on the uncovered areas or not; if omitted or negative the Coverage will preserve the already defined value.

the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be returned on invalid arguments.
RL2_SetRasterCoverageCopyright ( coverageName String , copyright String ) : Integer

RL2_SetRasterCoverageCopyright ( coverageName String , copyright String , license String ) : Integer
Inserts (or updates) Copyright and License infos associated to a Coverage.
  • coverage_name must identify an existing Coverage.
  • copyright identifies the Copyright holder; if NULL the current value will be preserved.
  • the optional argument license must reference one the Data Licenses registered into the data_licenses table, as e.g. CC0 1.0 or CC BY 4.0.

the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be returned on invalid arguments.
RL2_SetRasterCoverageDefaultBands ( coverageName String , red_band Integer , green_band Integer , blue_band Integer , nir_band Integer ) : Integer Inserts (or updates) the default Band mapping associated to a Coverage of the MULTIBAND type.
  • coverage_name must identify an existing Coverage.
  • red_band identifies the Index of the Red Band.
  • green_band identifies the Index of the Green Band.
  • blue_band identifies the Index of the Blue Band.
  • nir_band identifies the Index of the NIR Band (Near Infrared).
  • Note: the first Band has always Index 0.

the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be returned on invalid arguments.
RL2_EnableRasterCoverageAutoNDVI ( coverageName String , on_off Boolean) : Integer Activates (or deactivates) the AutoNDVI option for a Coverage of the MULTIBAND type having a Default Band selection.
Will return 1 (TRUE) on success or 0 (FALSE) on failure; -1 on invalid arguments
RL2_IsRasterCoverageAutoNdviEnabled ( db_prefix String , coverageName String ) : Boolean Tests if the AutoNDVI option for a Coverage of the MULTIBAND type is currently activated or not.
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • coverage_name must identify an existing Coverage.

Will return 1 (TRUE) or 0 (FALSE) accordingly to actual setting; -1 on invalid arguments or not existing Coverage.
RL2_SetRasterCoverageVisibilityRange ( coverageName String , min_scale_denominator Double , max_scale_denominator Double ) : Integer Updates the Visibility Range associated to a Raster Coverage.
  • coverage_name must identify an existing Coverage.
  • min_scale_denominator sets the lower visibility limit: it can legitimately be NULL thus meaning that no lower limit is defined.
  • max_scale_denominator sets the upper visibility limit: it can legitimately be NULL thus meaning that no upper limit is defined.
  • Note: you can set the one or the other, or both or none, as more appropriate.

the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be returned on invalid arguments.
RL2_GetRasterCoverageMinScaleDenominator ( db_prefix String , coverageName String ) : Double Will return the Visibility Range MinScaleDenominator associated to a Raster Coverage.
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • coverage_name must identify an existing Coverage.

the return type is Double if a MinScaleDenominator is defined, NULL if undefined: -1 will be returned on invalid arguments or not existing Coverage.
RL2_GetRasterCoverageMaxScaleDenominator ( db_prefix String , coverageName String ) : Double Will return the Visibility Range MaxScaleDenominator associated to a Raster Coverage.
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • coverage_name must identify an existing Coverage.

the return type is Double if a MaxScaleDenominator is defined, NULL if undefined: -1 will be returned on invalid arguments or not existing Coverage.
RL2_DropCoverage ( coverageName String ) : Integer

RL2_DropCoverage ( coverageName String , transaction Integer ) : Integer
Will attempt do completely remove a Raster Coverage (including all related Sections, Pyramids and Tiles) from the currently connected DB-file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note: if the second optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.
RL2_CopyRasterCoverage ( dbPrefix String , coverageName String ) : Integer

RL2_CopyRasterCoverage ( dbPrefix String , coverageName String , transaction boolean ) : Integer
Will copy a complete Raster Coverage from an attached DB to the currently connected (MAIN) DB.
  • a valid Raster Coverage matching coverageName must exists within the Attached DB identified by dbPrefix.
  • no Raster Coverage matching coverageName must exists within the MAIN DB.
    It will be automatically created and populated as appropriate.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note: if the third optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.
RL2_DeleteSection ( coverageName String , sectionID Integer ) : Integer

RL2_DeleteSection ( coverageName String , sectionID Integer , transaction Integer ) : Integer
Will attempt do completely remove a Raster Section (including a directly related Pyramid if present and all related Tiles) from the currently connected DB-file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note: if the third optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.

Back to the main Index of RL2 SQL Functions


SQL functions supporting Pyramid management

SyntaxSummary
RL2_Pyramidize ( coverageName String ) : Integer

RL2_Pyramidize ( coverageName String , sectionID Integer ) : Integer

RL2_Pyramidize ( coverageName String , sectionID Integer , forceRebuild Integer ) : Integer

RL2_Pyramidize ( coverageName String , sectionID Integer , forceRebuild Integer , transaction Integer ) : Integer
Will attempt do (re)build Section-based Pyramid levels.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • if a single sectionID is specified, then only the Pyramid levels directly belonging to that Section will be considered.
    A NULL sectionID always implies processing the whole Coverage.
  • if the optional argument forceRebuild (expected to be of the Boolean type) any already existing Pyramid level will be immediately destroyed and then rebuild. If not, all existing Pyramid levels will be left untouched and only eventually missing levels will be built.
  • if the last optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.
RL2_PyramidizeMonolithic ( coverageName String ) : Integer

RL2_PyramidizeMonolithic ( coverageName String , virtualLevels Integer ) : Integer

RL2_PyramidizeMonolithic ( coverageName String , virtualLevels Integer , transaction Integer ) : Integer
Will attempt do (re)build Pyramid levels of the Monolithic type.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • the whole Coverage will be always processed, and any eventually preexisting Section-based or Monolithic Pyramid will be destroyed in order to rebuild a new Pyramid from scratch.
  • the second optional argument virtualLevels allows to choose the preferred interleave factor between physical and virtual Levels. Acceptable values are 1, 2 or 3. The default setting is 3, with the notable exception of MONOCHROME 1-BIT Coverages, in which case will be 1.
  • if the last optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.
Important Notice: a Monolithic Pyramid is not compatible with any Coverage declared by enabling the mixedResolution Policy.
RL2_DePyramidize ( coverageName String ) : Integer

RL2_DePyramidize ( coverageName String , sectionID Integer ) : Integer

RL2_DePyramidize ( coverageName String , sectionID Integer , transaction Integer ) : Integer
Will attempt do destroy Pyramid levels.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • if a single sectionID is specified, then only the Pyramid levels directly belonging to that Section will be considered (only supported for Section-based Pyramids).
    A NULL sectionID always implies processing the whole Coverage.
  • if the last optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.

Back to the main Index of RL2 SQL Functions


SQL functions returning styled Maps

SyntaxSummary
RL2_GetMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer ) : BLOB

RL2_GetMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String ) : BLOB

RL2_GetMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String ) : BLOB

RL2_GetMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String , bgColor String ) : BLOB

RL2_GetMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String , bgColor String , transparent Integer ) : BLOB

RL2_GetMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String , bgColor String , transparent Integer , quality Integer ) : BLOB

RL2_GetMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String , bgColor String , transparent Integer , quality Integer , reaspect Integer ) : BLOB
Will attempt to create a digital image representing a Styled Map from a Coverage of the Raster type.
Will return a BLOB containing the Styled Map: or NULL on invalid arguments or if any error occurs.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the Styled Map; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the styleName could be eventually 'default', this corresponding to the implicit style supported for all Pixel Types except MULTIBAND (which always require some explicit style to be applied).
  • the BoundingBox is expected to exactly match the image's width and height dimensions at that resolution.
    Except when the optional argument reaspect is set to TRUE; in this later case each single axis could be independently rescaled.
  • the optional argument mimeType could be one of:
    • 'image/png': PNG image format (RGBA lossless compression, with transparencies)
    • 'image/png8': PNG image format (lossless compression, based on a Palette of max. 256 colors)
    • 'image/gif': GIF image format (lossless compression, based on a Palette of max. 256 colors)
    • 'image/jpeg': JPEG image format (RGB lossy compression)
    • 'image/tiff': TIFF image format (RGB uncompressed)
    • 'image/tiff8': TIFF image format (uncompressed, based on a Palette of max. 256 colors)
    • 'image/geotiff': TIFF image format (RGB uncompressed) with internal georeferencing
    • 'image/geotiff8': TIFF image format (uncompressed, based on a Palette of max. 256 colors) with internal georeferencing
    • 'application/pdf' or 'application/x-pdf': PDF document format
      • default is 'image/png'.
      • Note: png8, gif, tiff8 and geotiff8 images are usually noticeably smaller because are based on a restricted palette of colors, but sometimes at the cost of a possibly disturbing color degradation.
      • Caveat: all palette based formats strictly require to be supported by Leptonica
  • the optional bgColor argument is expected to be expressed in the canonical WEB HEX-RGB form, as in '#ff8080' (default is '#ffffff' i.e. full white).
  • the optional transparent argument is expected to be expressed as a Boolean value (default is 0 FALSE).
    Please note: transparency is supported uniquely by PNG images.
  • the optional argument quality (in the range 0 - 100; default 80) is meaningful only in the case of JPEG images.
RL2_GetStyledMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text ) : BLOB

RL2_GetStyledMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String ) : BLOB

RL2_GetStyledMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String , bgColor String ) : BLOB

RL2_GetStyledMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String , bgColor String , transparent Integer ) : BLOB

RL2_GetStyledMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String , bgColor String , transparent Integer , quality Integer ) : BLOB

RL2_GetStyledMapImageFromRaster ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String , bgColor String , transparent Integer , quality Integer , reaspect Integer ) : BLOB
Will attempt to create a digital image representing a Styled Map from a Coverage of the Raster type.
Will return a BLOB containing the Styled Map: or NULL on invalid arguments or if any error occurs.

Please note:
  • Almost all the arguments are the same as in RL2_GetMapImageFromRaster() and have identical interpretation.
  • The only exception being xml_style that is expected to contain a valid SLD/SE XML Raster Symbolizer.

In other words:
  • Both RL2_GetMapImageFromRaster() and RL2_GetStyledMapImageFromRaster() are very similar in their general behavior. The main difference between them is:
    • RL2_GetMapImageFromRaster() accepts the name of a registered Style.
    • RL2_GetStyledMapImageFromRaster() directly accepts an XML Style definition.
RL2_GetMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer ) : BLOB

RL2_GetMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String ) : BLOB

RL2_GetMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String ) : BLOB

RL2_GetMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String , bgColor String ) : BLOB

RL2_GetMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String , bgColor String , transparent Integer ) : BLOB

RL2_GetMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String , bgColor String , transparent Integer , quality Integer ) : BLOB

RL2_GetMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , styleName String , mimeType String , bgColor String , transparent Integer , quality Integer , reaspect Integer ) : BLOB
Will attempt to create a digital image representing a Styled Map from a Coverage of the Vector type.
Will return a BLOB containing the Styled Map: or NULL on invalid arguments or if any error occurs.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the Styled Map; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the styleName could be eventually 'default', this corresponding to the implicit style supported for all Pixel Types except MULTIBAND (which always require some explicit style to be applied).
  • the BoundingBox is expected to exactly match the image's width and height dimensions at that resolution.
    Except when the optional argument reaspect is set to TRUE; in this later case each single axis could be independently rescaled.
  • the optional argument mimeType has exactly the same interpretation as in RL2_GetMapImageFromRaster().
  • the optional bgColor argument is expected to be expressed in the canonical WEB HEX-RGB form, as in '#ff8080' (default is '#ffffff' i.e. full white).
  • the optional transparent argument is expected to be expressed as a Boolean value (default is 0 FALSE).
    Please note: transparency is supported uniquely by PNG images.
  • the optional argument quality (in the range 0 - 100; default 80) is meaningful only in the case of JPEG images.
RL2_GetStyledMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer ) : BLOB

RL2_GetStyledMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text ) : BLOB

RL2_GetStyledMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String ) : BLOB

RL2_GetStyledMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String , bgColor String ) : BLOB

RL2_GetStyledMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String , bgColor String , transparent Integer ) : BLOB

RL2_GetStyledMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String , bgColor String , transparent Integer , quality Integer ) : BLOB

RL2_GetStyledMapImageFromVector ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , xml_style Text , mimeType String , bgColor String , transparent Integer , quality Integer , reaspect Integer ) : BLOB
Will attempt to create a digital image representing a Styled Map from a Coverage of the Vector type.
Will return a BLOB containing the Styled Map: or NULL on invalid arguments or if any error occurs.

Please note:
  • Almost all the arguments are the same as in RL2_GetMapImageFromVector() and have identical interpretation.
  • The only exception being xml_style that is expected to contain a valid SLD/SE XML Vector Symbolizer.

In other words:
  • Both RL2_GetMapImageFromVector() and RL2_GetStyledMapImageFromVector() are very similar in their general behavior. The main difference between them is:
    • RL2_GetMapImageFromVector() accepts the name of a registered Style.
    • RL2_GetStyledMapImageFromVector() directly accepts an XML Style definition.
RL2_GetMapImageFromWMS ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer ) : BLOB

RL2_GetMapImageFromWMS ( dbPrefix String , coverageName String , boundingBox BLOB-Geometry , width Integer , height Integer , version String , styleName String , mimeType String , bgColor String , transparent Integer ) : BLOB
Will attempt to create a digital image representing a Styled Map from a Coverage of the WMS type.
Will return a BLOB containing the Styled Map: or NULL on invalid arguments or if any error occurs.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the Styled Map; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the version argument determinws which version of the WMS protocol should be used.
    Valid values are: 1.0.0, 1.1.0, 1.1.1 and 1.3.0
  • the styleName could be eventually 'default' (it depends on the specific capabilites declared from the remote server).
  • the BoundingBox is expected to exactly match the image's width and height dimensions at that resolution..
  • the argument mimeType could usually be one of 'image/png', 'image/jpeg' or 'image/tiff' (it depends on the specific capabilites declared from the remote server).
  • the optional bgColor argument is expected to be expressed in the canonical WEB HEX-RGB form, as in '#ff8080' (default is '#ffffff' i.e. full white).
  • the optional transparent argument is expected to be expressed as a Boolean value (default is 0 FALSE).
    Please note: transparency is supported uniquely by PNG images.
RL2_GetImageFromMapConfiguration ( configName String , boundingBox BLOB-Geometry , width Integer , height Integer ) : BLOB

RL2_GetImageFromMapConfiguration ( configName String , boundingBox BLOB-Geometry , width Integer , height Integer , mimeType String ) : BLOB

RL2_GetImageFromMapConfiguration ( configName String , boundingBox BLOB-Geometry , width Integer , height Integer , mimeType String , quality Integer ) : BLOB

RL2_GetImageFromMapConfiguration ( configName String , boundingBox BLOB-Geometry , width Integer , height Integer , mimeType String , quality Integer , reaspect Integer ) : BLOB
Will attempt to create a digital image representing a complex, multi-layered Styled Map from a registered MapConfiguration.
Will return a BLOB containing the Styled Map: or NULL on invalid arguments or if any error occurs.
Please note:
  • The configName argument is intended to specify which of the registered MapConfigurations should be used.
    Note: the required MapConfiguration must be registered into the MAIN DB
  • the boundingBox is expected to represent the overall extent of the Styled Map; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the BoundingBox is expected to exactly match the image's width and height dimensions at that resolution.
    Except when the optional argument reaspect is set to TRUE; in this later case each single axis could be independently rescaled.
  • the optional argument mimeType could be one of 'image/png', 'image/jpeg', 'image/tiff' or 'application/x-pdf'; default is 'image/png'.
  • the optional argument quality (in the range 0 - 100; default 80) is meaningful only in the case of JPEG images.

Back to the main Index of RL2 SQL Functions


SQL functions importing raster data from external datasources

SyntaxSummary
RL2_LoadRaster ( coverageName String , sourcePath String ) : Integer

RL2_LoadRaster ( coverageName String , sourcePath String , withWorldFile Integer ) : Integer

RL2_LoadRaster ( coverageName String , sourcePath String , withWorldFile Integer , forceSRID Integer ) : Integer

RL2_LoadRaster ( coverageName String , sourcePath String , withWorldFile Integer , forceSRID Integer , pyramidize Integer ) : Integer

RL2_LoadRaster ( coverageName String , sourcePath String , withWorldFile Integer , forceSRID Integer , pyramidize Integer, transaction Integer ) : Integer
Will attempt to create and populate a new Section within a Coverage by importing an external file-based raster datasource (of the JPEG, TIFF, GeoTiff or ASCII Grid type).
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • if the optional argument withWorldFile (expected to be of the Boolean type) is set to TRUE, then a corresponding WorldFile is expected to be found and will be used to goerefence the raster.
  • if the optional argument forceSRID is explicit set, than its value will be assumed to represent the SRID declared by the external datasource.
    Please note: declaring some forceSRID value is absolutely required for any JPEG, TIFF and ASCII Grid file, because only GeoTIFF could eventually declare some SRID.
  • if the optional argument pyramidize (expected to be of the Boolean type) is set to TRUE, then any Pyramid level directly supporting the current Section will be immediately built; otherwise Pyramid levels will be ignored.
  • if the last optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_LoadRastersFromDir ( coverageName String , dirPath String , extension String ) : Integer

RL2_LoadRastersFromDir ( coverageName String , dirPath String , extension String , withWorldFile Integer ) : Integer

RL2_LoadRastersFromDir ( coverageName String , dirPath String , extension String , withWorldFile Integer , forceSRID Integer ) : Integer

RL2_LoadRastersFromDir ( coverageName String , dirPath String , extension String , withWorldFile Integer , forceSRID Integer , pyramidize Integer ) : Integer

RL2_LoadRastersFromDir ( coverageName String , dirPath String , extension String , withWorldFile Integer , forceSRID Integer , pyramidize Integer, transaction Integer ) : Integer
Will attempt to import all external file-based raster datasources (of the JPEG, TIFF, GeoTiff or ASCII Grid type) found within an external directory.
For each datasource being imported a corresponding Section will be created and populated.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • the mandatory extension argument is expected to specify the filename extension identifying the files to be imported (e.g. .tif, .jpg or .asc).
  • if the optional argument withWorldFile (expected to be of the Boolean type) is set to TRUE, then a corresponding WorldFile is expected to be found and will be used to goerefence the raster.
  • if the optional argument forceSRID is explicit set, than its value will be assumed to represent the SRID declared by the external datasource.
    Please note: declaring some forceSRID value is absolutely required for any JPEG, TIFF and ASCII Grid file, because only GeoTIFF could eventually declare some SRID.
  • if the optional argument pyramidize (expected to be of the Boolean type) is set to TRUE, then any Pyramid level directly supporting the current Section will be immediately built; otherwise Pyramid levels will be ignored.
  • if the last optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_LoadRasterFromWMS ( coverageName String , sectionName String , getMapUrl String , boundingBox BLOB-Geometry , wmsVersion String , wmsLayerName String , wmsLayerStyle String , wmsImageFormat String , wmsPixelResolution Double ) : Integer

RL2_LoadRasterFromWMS ( coverageName String , sectionName String , getMapUrl String , boundingBox BLOB-Geometry , wmsVersion String , wmsLayerName String , wmsLayerStyle String , wmsImageFormat String , wmsHorzPixelResolution Double , wmsVertPixelResolution Double ) : Integer

RL2_LoadRasterFromWMS ( coverageName String , sectionName String , getMapUrl String , boundingBox BLOB-Geometry , wmsVersion String , wmsLayerName String , wmsLayerStyle String , wmsImageFormat String , wmsHorzPixelResolution Double , wmsVertPixelResolution Double , opaque Integer ) : Integer

RL2_LoadRasterFromWMS ( coverageName String , sectionName String , getMapUrl String , boundingBox BLOB-Geometry , wmsVersion String , wmsLayerName String , wmsLayerStyle String , wmsImageFormat String , wmsHorzPixelResolution Double , wmsVertPixelResolution Double , opaque Integer , swapXY Integer ) : Integer

RL2_LoadRasterFromWMS ( coverageName String , sectionName String , getMapUrl String , boundingBox BLOB-Geometry , wmsVersion String , wmsLayerName String , wmsLayerStyle String , wmsImageFormat String , wmsHorzPixelResolution Double , wmsVertPixelResolution Double , opaque Integer , swapXY Integer , proxy String ) : Integer

RL2_LoadRasterFromWMS ( coverageName String , sectionName String , getMapUrl String , boundingBox BLOB-Geometry , wmsVersion String , wmsLayerName String , wmsLayerStyle String , wmsImageFormat String , wmsHorzPixelResolution Double , wmsVertPixelResolution Double , opaque Integer , swapXY Integer , proxy String , transaction Integer ) : Integer
Will attempt to create and populate a new Section within a Coverage by importing raster data from an external WMS datasource.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • the getMapURL is expected to represent the base-URL for all tiled WMS GetMap requests.
  • the boundingBox is expected to represent the overall extent of the Section; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the wmsVersion, wmsLayerName, wmsLayerStyle, wmsImageFormat and opaque arguments corresponds to the equivalent elements required in order to dynamically compose all WMS GetMap requests.
  • a single WMS GetMap request will be issued for each tile required by the Section; the BoundingBox of each individual tile will be automatically determined from the overall Section's BoundingBox and the wmsHorzPixelResolution and wmsVertPixelResolution arguments.
  • the optional argument swapXY could be necessary sometimes in order to invert the default WMS axes order.
  • the optional argument proxy could be necessary sometimes when accessing the WEB from behind a firewalled network.
  • if the last optional argument (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_ImportSectionRawPixels ( coverageName String , sectionName String , width Integer , height Integer , pixelBuf BLOB , boundingBox BLOB-Geometry ) : Integer

RL2_ImportSectionRawPixels ( coverageName String , sectionName String , width Integer , height Integer , pixelBuf BLOB , boundingBox BLOB-Geometry , pyramidize Integer ) : Integer

RL2_ImportSectionRawPixels ( coverageName String , sectionName String , width Integer , height Integer , pixelBuf BLOB , boundingBox BLOB-Geometry , pyramidize Integer , transaction Integer ) : Integer

RL2_ImportSectionRawPixels ( coverageName String , sectionName String , width Integer , height Integer , pixelBuf BLOB , boundingBox BLOB-Geometry , pyramidize Integer, transaction Integer , bigEndian Boolean ) : Integer
Will attempt to populate a Section within a Coverage by importing raster data from a BLOB pixel buffer.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The target Coverage is expected to be found in the MAIN DB
  • pixelBuf is expected to be a BLOB corresponding to a pixel buffer organized as a rectangular matrix of height rows by width columns.
  • the boundingBox is expected to represent the overall extent of the BLOB pixel buffer; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • if the optional argument pyramidize (expected to be of the Boolean type) is set to TRUE, then any Pyramid level directly supporting the current Section will be immediately built; otherwise Pyramid levels will be ignored. The default setting is TRUE (that is immediately building all Pyramids).
  • if the optional argument transaction (expected to be of the Boolean type) isn't declared an internal SQL Transaction will be implicitly handled.
  • the optional argument bigEndian (expected to be of the Boolean type) determines if multi-byte pixel/band values are expected to be represented in their big- or little-endian encoding (default is FALSE, that is little-Endian).

Back to the main Index of RL2 SQL Functions



SQL functions exporting raw raster data to external files (Coverage oriented)

SyntaxSummary
RL2_WriteGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer ) : Integer

RL2_WriteGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String ) : Integer

RL2_WriteGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a Coverage into an external GeoTIFF file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported GeoTIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • if the optional argument withWorldFile is set to TRUE then an auxiliary WorldFile will be exported as well.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a Coverage into an external plain TIFF file supported by an auxiliary WorldFile.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a Coverage into an external plain TIFF file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteTripleBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteTripleBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteTripleBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer ) : Integer

RL2_WriteTripleBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String ) : Integer

RL2_WriteTripleBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external GeoTIFF file of the RGB type.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexRed, bandIndexGreen and bandIndexBlue arguments are intended to arbitrarily compose the RGB TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported GeoTIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • if the optional argument withWorldFile is set to TRUE then an auxiliary WorldFile will be exported as well.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteTripleBandTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteTripleBandTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteTripleBandTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteTripleBandTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external plain TIFF file of the RGB type supported by an auxiliary WorldFile.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexRed, bandIndexGreen and bandIndexBlue arguments are intended to arbitrarily compose the RGB TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteTripleBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteTripleBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteTripleBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteTripleBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external plain TIFF file of the RGB type.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexRed, bandIndexGreen and bandIndexBlue arguments are intended to arbitrarily compose the RGB TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteMonoBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteMonoBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteMonoBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer ) : Integer

RL2_WriteMonoBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String ) : Integer

RL2_WriteMonoBandGeoTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external GeoTIFF file of the Grayscale type.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexGray argument is intended to arbitrarily compose the Grayscale TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported GeoTIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • if the optional argument withWorldFile is set to TRUE then an auxiliary WorldFile will be exported as well.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteMonoBandTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteMonoBandTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteMonoBandTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteMonoBandTiffTFW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external plain TIFF file of the Grayscale type supported by an auxiliary WorldFile.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexGray argument is intended to arbitrarily compose the Grayscale TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteMonoBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteMonoBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteMonoBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteMonoBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external plain TIFF file of the Grayscale type.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexGray argument is intended to arbitrarily compose the Grayscale TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteJpegJGW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteJpegJGW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteJpegJGW ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , quality Integer ) : Integer
Will attempt to export raw raster data from a GRAYSCALE UINT8 or RGB UINT8 Coverage into an external JPEG file supported by an auxiliary WorldFile.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported JPEG; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the JPEG width and height dimensions at that resolution.
  • the last optional argument can be used so to specify the preferred JPEG quality (in the range 0 - 100); default is 80.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteJpeg ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteJpeg ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteJpeg ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , quality Integer ) : Integer
Will attempt to export raw raster data from a GRAYSCALE UINT8 or RGB UINT8 Coverage into an external JPEG file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported JPEG; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the JPEG width and height dimensions at that resolution.
  • the last optional argument can be used so to specify the preferred JPEG quality (in the range 0 - 100); default is 80.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer ) : Integer

RL2_WriteAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer , decimalDigits Integer ) : Integer
Will attempt to export raw raster data from a DATAGRID Coverage into an external ASCII Grid file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported ASCII Grid; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the pixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels; rectangular pixels aren't supported by ASCII Grids.
  • and the BoundingBox must exactly match the ASCII Grid width and height dimensions at that resolution.
  • the optional argument isPixelCentered (expected to be of the Boolean type) determines if the ASCII Grid will declare xllcenter and yllcenter instead of xllcorner and yllconer (default is TRUE).
  • the last optional argument can be used so to specify how many decimal digits have to be exported into the ASCII Grid; default is 4 decimal digits.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteNdviAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteNdviAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer ) : Integer

RL2_WriteNdviAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer , decimalDigits Integer ) : Integer
Will attempt to export calculated NDVI data (Normalized Difference Vegetation Index) from a MULTIBAND Coverage into an external ASCII Grid file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • The Coverage identified by coverageName must be of the MULTIBAND type and must have a Default Band selection with AutoNDVI flag enabled.
  • the boundingBox is expected to represent the overall extent of the exported ASCII Grid; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the pixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels; rectangular pixels aren't supported by ASCII Grids.
  • and the BoundingBox must exactly match the ASCII Grid width and height dimensions at that resolution.
  • the optional argument isPixelCentered (expected to be of the Boolean type) determines if the ASCII Grid will declare xllcenter and yllcenter instead of xllcorner and yllconer (default is TRUE).
  • the last optional argument can be used so to specify how many decimal digits have to be exported into the ASCII Grid; default is 4 decimal digits.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteNdwiAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteNdwiAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer ) : Integer

RL2_WriteNdwiAsciiGrid ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer , decimalDigits Integer ) : Integer
Will attempt to export calculated NDWI data (Normalized Difference Water Index from a MULTIBAND Coverage into an external ASCII Grid file.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • The Coverage identified by coverageName must be of the MULTIBAND type and must have a Deafult Band selection with AutoNDVI flag enabled.
  • the boundingBox is expected to represent the overall extent of the exported ASCII Grid; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the pixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels; rectangular pixels aren't supported by ASCII Grids.
  • and the BoundingBox must exactly match the ASCII Grid width and height dimensions at that resolution.
  • the optional argument isPixelCentered (expected to be of the Boolean type) determines if the ASCII Grid will declare xllcenter and yllcenter instead of xllcorner and yllconer (default is TRUE).
  • the last optional argument can be used so to specify how many decimal digits have to be exported into the ASCII Grid; default is 4 decimal digits.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_ExportRawPixels ( dbPrefix String , coverageName String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : BLOB

RL2_ExportRawPixels ( dbPrefix String , coverageName String , width Integer , height Integer , boundingBox BLOB-Geometry , horzResolution Double , vertResolution Double ) : BLOB

RL2_ExportRawPixels ( dbPrefix String , coverageName String , width Integer , height Integer , boundingBox BLOB-Geometry , horzResolution Double , vertResolution Double , bidEndian Boolean ) : BLOB
Will return a BLOB object containing a pixel buffer organized as a rectangular matrix of height rows by width columns.
Will return NULL on invalid arguments or on any error.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • The Coverage identified by coverageName must exist.
  • the boundingBox is expected to represent the overall extent of the exported pixel buffer; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the pixelResolution is intended for square pixels; rectangular pixels are supported by declaring both horzResolution and vertResolution.
  • the optional argument bigEndian (expected to be of the Boolean type) determines if multi-byte pixel/band values must be represented in their big- or little-endian encoding (default is FALSE, that is little-Endian).


Back to the main Index of RL2 SQL Functions


SQL functions exporting raw raster data to external files (Section oriented)

SyntaxSummary
RL2_WriteSectionGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer ) : Integer

RL2_WriteSectionGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String ) : Integer

RL2_WriteSectionGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a Coverage into an external GeoTIFF file; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported GeoTIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • if the optional argument withWorldFile is set to TRUE then an auxiliary WorldFile will be exported as well.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteSectionTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a Coverage into an external plain TIFF file supported by an auxiliary WorldFile; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteSectionTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a Coverage into an external plain TIFF file; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionTripleBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionTripleBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionTripleBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer ) : Integer

RL2_WriteSectionTripleBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String ) : Integer

RL2_WriteSectionTripleBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external GeoTIFF file of the RGB type; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexRed, bandIndexGreen and bandIndexBlue arguments are intended to arbitrarily compose the RGB TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported GeoTIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • if the optional argument withWorldFile is set to TRUE then an auxiliary WorldFile will be exported as well.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionTripleBandTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionTripleBandTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionTripleBandTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteSectionTripleBandTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external plain TIFF file of the RGB type supported by an auxiliary WorldFile; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexRed, bandIndexGreen and bandIndexBlue arguments are intended to arbitrarily compose the RGB TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionTripleBandTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionTripleBandTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionTripleBandTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteSectionTripleBandTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexRed Integer , bandIndexGreen Integer , bandIndexBlue Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external plain TIFF file of the RGB type; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexRed, bandIndexGreen and bandIndexBlue arguments are intended to arbitrarily compose the RGB TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionMonoBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionMonoBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionMonoBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer ) : Integer

RL2_WriteSectionMonoBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String ) : Integer

RL2_WriteSectionMonoBandGeoTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , withWoldFile Integer , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external GeoTIFF file of the Grayscale type; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexGray argument is intended to arbitrarily compose the Grayscale TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported GeoTIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • if the optional argument withWorldFile is set to TRUE then an auxiliary WorldFile will be exported as well.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionMonoBandTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionMonoBandTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionMonoBandTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteSectionMonoBandTiffTFW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external plain TIFF file of the Grayscale type supported by an auxiliary WorldFile; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexGray argument is intended to arbitrarily compose the Grayscale TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionMonoBandTiff ( dbPrefix String , coverageName String , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionMonoBandTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionMonoBandTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String ) : Integer

RL2_WriteSectionMonoBandTiff ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , bandIndexGray Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , tiffCompression String , tiffTileSize Integer ) : Integer
Will attempt to export raw raster data from a MULTIBAND or RGB Coverage into an external plain TIFF file of the Grayscale type; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the bandIndexGray argument is intended to arbitrarily compose the Grayscale TIFF starting from the Bands supported by the Coverage.
    Please note: the first Band always corresponds to index ZERO
  • the boundingBox is expected to represent the overall extent of the exported TIFF; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the TIFF width and height dimensions at that resolution.
  • the optional argument tiffCompression could be one of 'NONE', 'DEFLATE', 'LZW', 'JPEG', 'FAX3' or 'FAX4'; default is 'NONE'.
  • the last optional argument can be used so to specify the preferred TIFF tile size (only square tiles are supported); default is 256.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionJpegJGW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionJpegJGW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionJpegJGW ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , quality Integer ) : Integer
Will attempt to export raw raster data from a GRAYSCALE UINT8 or RGB UINT8 Coverage into an external JPEG file supported by an auxiliary WorldFile; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported JPEG; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the JPEG width and height dimensions at that resolution.
  • the last optional argument can be used so to specify the preferred JPEG quality (in the range 0 - 100); default is 80.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionJpeg ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionJpeg ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double ) : Integer

RL2_WriteSectionJpeg ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , horzPixelResolution Double , vertPixelResolution Double , quality Integer ) : Integer
Will attempt to export raw raster data from a GRAYSCALE UINT8 or RGB UINT8 Coverage into an external JPEG file; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported JPEG; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the horzPixelResolution and vertPixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels.
  • and the BoundingBox must exactly match the JPEG width and height dimensions at that resolution.
  • the last optional argument can be used so to specify the preferred JPEG quality (in the range 0 - 100); default is 80.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer ) : Integer

RL2_WriteSectionAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer , decimalDigits Integer ) : Integer
Will attempt to export raw raster data from a DATAGRID Coverage into an external ASCII Grid file; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • the boundingBox is expected to represent the overall extent of the exported ASCII Grid; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the pixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels; rectangular pixels aren't supported by ASCII Grids.
  • and the BoundingBox must exactly match the ASCII Grid width and height dimensions at that resolution.
  • the optional argument isPixelCentered (expected to be of the Boolean type) determines if the ASCII Grid will declare xllcenter and yllcenter instead of xllcorner and yllconer (default is TRUE).
  • the last optional argument can be used so to specify how many decimal digits have to be exported into the ASCII Grid; default is 4 decimal digits.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionNdviAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionNdviAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer ) : Integer

RL2_WriteSectionNdviAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer , decimalDigits Integer ) : Integer
Will attempt to export calculated NDVI data (Normalized Difference Vegetation Index from a MULTIBAND Coverage into an external ASCII Grid file; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • The Coverage identified by coverageName must be of the MULTIBAND type and must have a Default Band selection with AutoNDVI flag enabled.
  • the boundingBox is expected to represent the overall extent of the exported ASCII Grid; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the pixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels; rectangular pixels aren't supported by ASCII Grids.
  • and the BoundingBox must exactly match the ASCII Grid width and height dimensions at that resolution.
  • the optional argument isPixelCentered (expected to be of the Boolean type) determines if the ASCII Grid will declare xllcenter and yllcenter instead of xllcorner and yllconer (default is TRUE).
  • the last optional argument can be used so to specify how many decimal digits have to be exported into the ASCII Grid; default is 4 decimal digits.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_WriteSectionNdwiAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : Integer

RL2_WriteSectionNdwiAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer ) : Integer

RL2_WriteSectionNdwiAsciiGrid ( dbPrefix String , coverageName String , sectionID Integer , filePath String , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double , isPixelCentered Integer , decimalDigits Integer ) : Integer
Will attempt to export calculated NDWI data (Normalized Difference Water Index from a MULTIBAND Coverage into an external ASCII Grid file; only the Tiles directly belonging to the selected Section will be considered.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • The Coverage identified by coverageName must be of the MULTIBAND type and must have a Default Band selection with AutoNDVI flag enabled.
  • the boundingBox is expected to represent the overall extent of the exported ASCII Grid; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the pixelResolution must exactly match the Coverage's base resolution or one of the resolutions made available by the corresponding Pyramid levels; rectangular pixels aren't supported by ASCII Grids.
  • and the BoundingBox must exactly match the ASCII Grid width and height dimensions at that resolution.
  • the optional argument isPixelCentered (expected to be of the Boolean type) determines if the ASCII Grid will declare xllcenter and yllcenter instead of xllcorner and yllconer (default is TRUE).
  • the last optional argument can be used so to specify how many decimal digits have to be exported into the ASCII Grid; default is 4 decimal digits.
Please note very well: this SQL function is only available when the environment variable SPATIALITE_SECURITY=relaxed is set.
RL2_ExportSectionRawPixels ( dbPrefix String , coverageName String , sectionId Integer , width Integer , height Integer , boundingBox BLOB-Geometry , pixelResolution Double ) : BLOB

RL2_ExportSectionRawPixels ( dbPrefix String , coverageName String , sectionId Integer , width Integer , height Integer , boundingBox BLOB-Geometry , horzResolution Double , vertResolution Double ) : BLOB

RL2_ExportSectionRawPixels ( dbPrefix String , coverageName String , sectionId Integer , width Integer , height Integer , boundingBox BLOB-Geometry , horzResolution Double , vertResolution Double , bidEndian Boolean ) : BLOB
Will return a BLOB object containing a pixel buffer organized as a rectangular matrix of height rows by width columns; only the Tiles directly belonging to the selected Section will be considered.
Will return NULL on invalid arguments or on any error.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the Coverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • The Coverage identified by coverageName must exist.
  • the boundingBox is expected to represent the overall extent of the exported pixel buffer; you could eventually pass any arbitrary kind of Geometry, and the Bounding Box aka MBR will be automatically determined.
  • the pixelResolution is intended for square pixels; rectangular pixels are supported by declaring both horzResolution and vertResolution.
  • the optional argument bigEndian (expected to be of the Boolean type) determines if multi-byte pixel/band values must be represented in their big- or little-endian encoding (default is FALSE, that is little-Endian).


Back to the main Index of RL2 SQL Functions


SQL functions supporting Vector Draping

SyntaxSummary
RL2_DrapeGeometries ( dbPrefix String , rasterCoverage String , coverageList String , spatialTable String , geom2D String , geom3D String ) : Integer

RL2_DrapeGeometries ( dbPrefix String , rasterCoverage String , coverageList String , spatialTable String , geom2D String , geom3D String , noDataValue Double ) : Integer

RL2_DrapeGeometries ( dbPrefix String , rasterCoverage String , coverageList String , spatialTable String , geom2D String , geom3D String , noDataValue Double , densifyDist Double , ZsimplifyDist Double ) : Integer

RL2_DrapeGeometries ( dbPrefix String , rasterCoverage String , coverageList String , spatialTable String , geom2D String , geom3D String , noDataValue Double , densifyDist Double , ZsimplifyDist Double , updateM Boolean ) : Integer
Will attempt to derive 3D geometries starting from 2D by draping all them over one (or more) Raster Coverage(s) of the DEM/DTM type.
Will return 1 (TRUE/SUCCESS) or 0 (FALSE/FAILURE): or -1 on invalid arguments.
Please note:
  • The dbPrefix argument is intended to specify the ATTACHED-DB where the rasterCoverage is expected to be found; it could be eventually NULL, and in this case the MAIN DB will implicitly be assumed.
  • The Coverage identified by coverageName must be of the DATAGRID type and is expected to contain Elevation data. It can legitimately be NULL if a coverageList is defined.
  • coverageList can legitimately be NULL. If not it's expected to be the name of a Table containing a list of multiple Raster Coverages to be processed. All the Raster Coverages in the list must share the same SRID value.
    Note: coverageName and coverageList are mutually exclusive. You must set the one or the other but not both at the same time.
  • spatialTable is expected to be the name of an existing Table in the MAIN DB.
  • geom2D is expected to be the name of an existing Geometry Column in the above Table. It must share the same SRID value declared by the Raster Coverage(s).
  • geom3D is the name of the new Geometry Column where to store all the extrapolated 3D geometries.
    Note: this column must not exist and will be automatically created.
  • the optional noDataValue is intended to explicitly set a default Z coordinate corresponding to NODATA pixels. If not explicitly defined it will be assumed to be 0.0
  • the optional densifyDist is intended to specify the densification distance for Vertices being interpolated into 2D Linestrings or Polygon Rings. If not explicitly defined it will be assumed to be 0.0 (that is no densification at all).
  • the optional ZsimplifyDistance is intended to specify the simplification distance for suppressing redundant interpolated Vertices into 3D Linestrings or Polygon Rings. If not explicitly defined it will be assumed to be 0.0 (that is no simplification at all).
  • the optional updateM boolean flag when set to TRUE will trigger the extrapolation of M coordinates instead of Z. If not explicitly defined it will be assumed to be FALSE (thus intending the extrapolation of Z coordinates).
You can learn more about Vector Draping by reading this Wiki page
RL2_GetDrapingLastError () : String Will return the more recent Warning or Error Message issued by the Draping module.
NULL if no pending Draping message exists.

Back to the main Index of RL2 SQL Functions


Back to RasterLite2 doc index