Skip to content
Mark Johnson edited this page Nov 12, 2015 · 13 revisions

Changes made in rl2tiff.c

[--> 'List of Sql-Commands'] (Home#commands)

[<-- 'Index Page for RasterLite2 - Commands'] (RasterLite2-Index#commands)

[<-- 'Cutline / RasterDefaults Index'] (Cutline-Index#code_changes)


  • init_tiff_origin
    • in cases where TIFFGetFieldDefaulted
      • will return (without a need to check the return code) a default value
        • TIFFGetField was replaced with TIFFGetFieldDefaulted
    • otherwise
      • TIFFGetField with the checking of the return code is used

  • TIFFTAG_GDAL_NODATA
    • User/ Custom defined TIFFTAG support has been added
      • this enables the use of
        • TIFFGetField and TIFFSetField
    • a read and write function has been created
      • to translate a GDAL_NODATA to a RL2-NODATA
        • fetch_gdal_nodata
          • reads a rl2PixelPtr and fills a string with the found value
            • used when creating a GeoTiff with TIFFTAG_GDAL_NODATA
        • rl2_set_gdal_nodata
          • creates a rl2PixelPtr from a string received from TIFFTAG_GDAL_NODATA
            • which can be used to set the raster_coverage nodata value
              • each band receives the same value
      • a major difference between the 2 is
        • that a GDAL-NODATA is use for all bands
        • where as RL2-NODATA can have a different value for each
          • the functions above insure
            • that these rules are applied

Note:

  • to insure, that during RL2_LoadRaster
    • a User-defined nodata in never overwritten by a found TIFFTAG_GDAL_NODATA
      • rl2sqlaux.c *default_nodata
        • will set the Pixels as Transparent (isTransparent == 1)
          • isTransparent is otherwise (for a nodata pixel) not used
      • rl2import.c do_import_file
        • set_coverage_nodata will only be called
          • when the existing raster_coverage nodata has (isTransparent == 1)

  • DOCUMENTNAME

    • will be read and used as title
  • IMAGEDESCRIPTION

    • will be read and used as abstract
  • COPYRIGHT

    • will be read and used as copyright
      • but will not be saved until a decision has been made
        • to add such a field to raster_coverages
  • rl2import.c do_import_file

    • set_coverage_infos will only be called
      • if the existing title and abstract
        • have not already be set by the User
          • value empty or '*** missing ... ***'

Goal:

  • is to simplify the import process

[<-- 'Cutline / RasterDefaults Index'] (Cutline-Index#code_changes)


2015-11-12: Mark Johnson, Berlin Germany