Skip to content

RL2_SetRasterCoverageDefaults

Mark Johnson edited this page Oct 6, 2018 · 6 revisions

Setting of RasterDefaults

--> 'List of Sql-Commands'

<-- 'Index Page for RasterLite2 - Commands'

<-- 'Cutline / RasterDefaults Index'


Original Documentation RasterLite2 SQL functions - reference list)

  • RL2_SetRasterCoverageDefaults(text coverage, BLOB center_point)
  • RL2_SetRasterCoverageDefaults(text coverage, int zoom_min, int zoom_default,int zoom_max)
  • RL2_SetRasterCoverageDefaults(text coverage, BLOB center_point, int zoom_min, int zoom_default,int zoom_max)
  • RL2_SetRasterCoverageDefaults(text coverage, reset parm)

Parameters :

  • coverage: chosen name of raster_coverage
  • center_point: as valid POINT, the must be inside the raster_coverage
  • [zoom_type]:
    • zoom_min: [as second (or with center_point, third**) parameter]
    • zoom_default: [as third (or with center_point, fourth) parameter]
    • zoom_max: [as fourth (or with center_point, fith) parameter]
  • [reset_type]: 0,1,2 [as second parameter, without third and fourth parameter]
    • 0 : reset center and zoom-levels
    • 1 : reset center value ONLY
    • 2 : reset zoom-levels values ONLY

Validity rules:

  • Center-Point
    • will be transformed to the srid of the raster_coverage when needed
    • must be inside the raster_coverage (after possible transformation)
      • if not the function will fail
  • Zoom-Levels
    • must be between 0 and 30
      • values outside this range will be ignored
        • when you only want to set the zoom_default to 18
          • SELECT RL2_SetRasterCoverageDefaults('coverage_name',-1,18,-1)
    • zoom_min < zoom_default < zoom_max * if not the function will fail

  • Sample of default usage with
    • together with the raster_coverage name
SELECT RL2_SetRasterCoverageDefaults
(
 'dritte_landesaufnahme_toscana', -- raster_coverage name
 MakePoint(681582.6377649425,4849582.896019161,23032), -- center_point
 10, -- zoom_min
 14, -- zoom_default
 18  -- zoom_max
);

Resetting back to default values

  • possible values of 2nd parameter
    • 0 = all values (Center-Point and Zoom-Levels)
    • 1 = Center-Point only
    • 2 = Zoom-Levels only
SELECT RL2_SetRasterCoverageDefaults
(
 'dritte_landesaufnahme_toscana', -- raster_coverage name
 0 -- 0,1 or 2
);

2015-11-11: Mark Johnson, Berlin Germany