Skip to content

RL2_LoadRasterFromDir

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

Filling a Raster Coverage with Geo-Referenced Image-Files stored in a specific directory

--> 'List of Sql-Commands'

<-- 'Index Page for RasterLite2 - Commands'


Original Documentation [RasterLite2 SQL functions - reference list)[(https://www.gaia-gis.it/fossil/librasterlite2/wiki?name=sql_reference_list)

  • RL2_LoadRasterFromDir(text coverage, text dir_path, text file_ext, int with_worldfile, int force_srid, int pyramidize, int transaction)

Parameters [optional parameters]:

  • coverage: chosen name of raster_coverage
  • dir_path: directory where the files to be loaded are stored
  • file_ext: file extension of the files in the directory to be loaded
  • [with_worldfile]: (0= if geotiff, 1= if worldfile)
  • [force_srid]: (0= if geotiff, 1= if worldfile)
    • world files have no srid support build in
      • this value will set the srid to be used
    • geotiff, without a world file
      • will ignore this value (can be 0)
  • [pyramidize]: calls RL2_Pyramidize (not RL2_PyramidizeMonolithic)
  • [transaction]:

  • Sample for a GeoTiff
    • without a world-file
SELECT RL2_LoadRastersFromDir
(
 -- chosen name of raster_coverage
 'dritte_landesaufnahme_toscana_dir', 
  -- directory where the files to be loaded are stored
 '../Dritte_Landesaufnahme.Toscana',
 -- file extension of the files in the directory to be loaded
 '.tif'
);

The result in QGIS then looks like this

  • background: 1861 map of Northern Italy
  • geometries: presen day borders of the Toscanna
  • Geotiff : 1904-12 maps in the directory Dritte_Landesaufnahme.Toscana

Preview : 1903-1912 - Dritte Landesaufnahme (Franzisco-Josephinische) Österreich - 1:200000, Area of Toscana


2015-09-01: Mark Johnson, Berlin Germany