Pyramid.pm

Summary
Pyramid.pm
BE4::PyramidStore all informations about a pyramid.
STRPYRTMPLTDefine the template XML for the pyramid’s descriptor.
DEFAULTDefine default values for directories’ names.
UPDATE_MODESDefines possibles values for the ‘update_mode’ parameter.
Constructors
newPyramid constructor.
_initWe detect missing parameters and define default values for pyramids’ name and path (for the new one and the ancestor).
_loadWe have to collect pyramid’s attributes’ values
Ancestor informations extracter
fillFromAncestorWe want to update an old pyramid with new data.
readConfPyramidParse an XML file, a pyramid’s descriptor (file.pyr) to pick up informations.
readCachePyramidBrowse old cache.
findImagesRecursive method to browse a file tree structure.
isUpdateModeTests if the value for parameter ‘update_mode’ is allowed.
Level and limits methods
updateLevelsDetermine top and bottom for the new pyramid and create Level objects.
createLevelsCreate all objects Level between the global top and the bottom levels (from data sources) for the new pyramid.
addLevelStore the Level object in the Pyramid object.
updateTMLimitsCompare old extrems rows/columns of the given level with the news and update values.
Pyramid’s elements writers
writeConfPyramidExport the Pyramid object to XML format, write the pyramid’s descriptor (pyr_desc_path/pyr_name_new.pyr).
writeListPyramidWrite the pyramid list.
writeCachePyramidWrite the Cache Directory Structure (CDS).
Getters - Setters
ownMasks
ownMetadata
isNewPyramid
getNewName
getNewDescriptorFile
getNewDescriptorDir
getNewListFile
getNewDataDir
getOldName
getOldDescriptorFile
getOldListFile
getOldDataDir
getUpdateMode
getTmsName
getSRS
getTileMatrixSet
getDirImageReturns image directory, just ethe name or the complete path
getDirMaskReturns mask directory, just the name or the complete path
getDirNodataReturns nodata directory, just the name or the complete path
getDirDepth
getInterpolation
getGamma
getCompression
getCompressionOption
getFormatCode
getPixel
getSamplesPerPixel
getPhotometric
getBitsPerSample
getSampleFormat
getNodata
getNodataValue
getTopOrder
getBottomOrder
getLevel
getLevels
getOrderfromIDReturns the tile matrix order from the ID.
getIDfromOrderReturns the tile matrix ID from the ascending resolution order (integer).
getCacheImageSizeReturns the pyramid’s image’s pixel width and height as the double list (width, height), for a given level.
getCacheImageWidthReturns the pyramid’s image’s pixel width, for a given level.
getCacheImageHeightReturns the pyramid’s image’s pixel height, for a given level.
getTileWidthReturns the tile’s pixel width, for a given level.
getTileHeightReturns the tile’s pixel height, for a given level.
getTilesPerWidth
getTilesPerHeight
Export methods
exportForDebugReturns all pyramid’s information.
DetailsDetails about pyramid’s working.

BE4::Pyramid

Exporter
BE4::Pyramid

Store all informations about a pyramid.

Using

use BE4::Pyramid;

# 1. a new pyramid

my $params_options = {
    #
    pyr_name_new => "ORTHO_RAW_LAMB93_D075-O",
    pyr_desc_path => "/home/ign/DATA",
    pyr_data_path => "/home/ign/DATA",
    #
    tms_name     => "LAMB93_10cm.tms",
    tms_path     => "/home/ign/TMS",
    #
    #
    dir_depth    => 2,
    dir_image    => "IMAGE",
    dir_nodata   => "NODATA",
    dir_mask     => "MASK",
    #
    image_width  => 16,
    image_height => 16,
    #
    color         => "255,255,255", # white
    #
    compression         => "raw",
    bitspersample       => 8,
    sampleformat        => "uint",
    photometric         => "rgb",
    samplesperpixel     => 3,
    interpolation       => "bicubic",
};

my $objPyr = BE4::Pyramid->new($params_options,$path_temp);

$objPyr->writeConfPyramid(); # write pyramid's descriptor in /home/ign/ORTHO_RAW_LAMB93_D075-O.pyr

$objP->writeCachePyramid($objForest);  # root directory is "/home/ign/ORTHO_RAW_LAMB93_D075-O/"

# 2. a update pyramid, with an ancestor

my $params_options  = {
    #
    pyr_name_old        => "ORTHO_RAW_LAMB93_D075-O",
    pyr_data_path_old   => "/home/ign/DATA",
    pyr_desc_path_old   => "/home/ign/DATA",
    #
    pyr_name_new        => "ORTHO_RAW_LAMB93_D075-E",
    pyr_desc_path       => "/home/ign/DATA",
    pyr_data_path       => "/home/ign/DATA",
    #
    update_mode      => "slink"
};

my $objPyr = BE4::Pyramid->new($params_options,"/home/ign/TMP");

$objPyr->writeConfPyramid(); # write pyramid's descriptor in /home/ign/ORTHO_RAW_LAMB93_D075-E.pyr

$objPyr->writeCachePyramid($objForest);  # root directory is "/home/ign/ORTHO_RAW_LAMB93_D075-E/"

Attributes

new_pyramidhash - Name and paths for the new pyramid
name - string - Pyramid's name
desc_path - string - Directory in which we write the pyramid's descriptor
data_path - string - Directory in which we write the pyramid's data
content_path - string - Path to the content's list
old_pyramidhash - Name and paths for the ancestor pyramid
name - string - Pyramid's name
desc_path - string - Directory in which we write the pyramid's descriptor
data_path - string - Directory in which we write the pyramid's data
update_mode - string - type of updating the old pyramid.
    |   Possible values are : 'slink' (soft link - default), 'hlink' (hard link), 'copy' (hard copy), 'inject' (no new pyramid, we update the old pyramid directly).
content_path - string - Path to the content's list
dir_depthinteger - Number of subdirectories from the level root to the image : depth = 2 => /.../LevelID/SUB1/SUB2/IMG.tif
dir_imagestring - Name of images’ directory
dir_nodatastring - Name of nodata’s directory
dir_maskstring - Name of masks’ directory
own_masksboolean - If TRUE, masks generated by tools will be written in the final pyramid.  If we want to export them, we have to use them in tools.
dir_metadatastring - Name of metadats’ directory (NOT IMPLEMENTED)
image_widthinteger - Number of tile in an pyramid’s image, widthwise.
image_heightinteger - Number of tile in an pyramid’s image, heightwise.
pyrImgSpecPyrImageSpec - New pyramid’s image’s components
tmsTileMatrixSet - Pyramid’s images will be cutted according to this TMS grid.
nodataNoData - Informations about nodata
levelsLevel hash - Key is the level ID, the value is the Level object.  Define levels present in this new pyramid.

Limitations

File name of pyramid must be with extension : pyr or PYR.

Summary
STRPYRTMPLTDefine the template XML for the pyramid’s descriptor.
DEFAULTDefine default values for directories’ names.
UPDATE_MODESDefines possibles values for the ‘update_mode’ parameter.
Constructors
newPyramid constructor.
_initWe detect missing parameters and define default values for pyramids’ name and path (for the new one and the ancestor).
_loadWe have to collect pyramid’s attributes’ values
Ancestor informations extracter
fillFromAncestorWe want to update an old pyramid with new data.
readConfPyramidParse an XML file, a pyramid’s descriptor (file.pyr) to pick up informations.
readCachePyramidBrowse old cache.
findImagesRecursive method to browse a file tree structure.
isUpdateModeTests if the value for parameter ‘update_mode’ is allowed.
Level and limits methods
updateLevelsDetermine top and bottom for the new pyramid and create Level objects.
createLevelsCreate all objects Level between the global top and the bottom levels (from data sources) for the new pyramid.
addLevelStore the Level object in the Pyramid object.
updateTMLimitsCompare old extrems rows/columns of the given level with the news and update values.
Pyramid’s elements writers
writeConfPyramidExport the Pyramid object to XML format, write the pyramid’s descriptor (pyr_desc_path/pyr_name_new.pyr).
writeListPyramidWrite the pyramid list.
writeCachePyramidWrite the Cache Directory Structure (CDS).
Getters - Setters
ownMasks
ownMetadata
isNewPyramid
getNewName
getNewDescriptorFile
getNewDescriptorDir
getNewListFile
getNewDataDir
getOldName
getOldDescriptorFile
getOldListFile
getOldDataDir
getUpdateMode
getTmsName
getSRS
getTileMatrixSet
getDirImageReturns image directory, just ethe name or the complete path
getDirMaskReturns mask directory, just the name or the complete path
getDirNodataReturns nodata directory, just the name or the complete path
getDirDepth
getInterpolation
getGamma
getCompression
getCompressionOption
getFormatCode
getPixel
getSamplesPerPixel
getPhotometric
getBitsPerSample
getSampleFormat
getNodata
getNodataValue
getTopOrder
getBottomOrder
getLevel
getLevels
getOrderfromIDReturns the tile matrix order from the ID.
getIDfromOrderReturns the tile matrix ID from the ascending resolution order (integer).
getCacheImageSizeReturns the pyramid’s image’s pixel width and height as the double list (width, height), for a given level.
getCacheImageWidthReturns the pyramid’s image’s pixel width, for a given level.
getCacheImageHeightReturns the pyramid’s image’s pixel height, for a given level.
getTileWidthReturns the tile’s pixel width, for a given level.
getTileHeightReturns the tile’s pixel height, for a given level.
getTilesPerWidth
getTilesPerHeight
Export methods
exportForDebugReturns all pyramid’s information.
DetailsDetails about pyramid’s working.

STRPYRTMPLT

my $STRPYRTMPLT

Define the template XML for the pyramid’s descriptor.

DEFAULT

my %DEFAULT

Define default values for directories’ names.

UPDATE_MODES

my @UPDATE_MODES

Defines possibles values for the ‘update_mode’ parameter.

Constructors

new

sub new

Pyramid constructor.  Bless an instance.

Parameters (list)

paramshash - All parameters about the new pyramid, “pyramid” section of the be4 configuration file
pathfilestring - Path to the Tile Matrix File (with extension .tms or .TMS)

See also

_init, _load

_init

sub _init

We detect missing parameters and define default values for pyramids’ name and path (for the new one and the ancestor).  Store data directories’ names

Parameters (list)

paramshash - All parameters about pyramid’s format, pyramid section of the be4 configuration file

_load

sub _load

We have to collect pyramid’s attributes’ values

  • for a new pyramid : all informations must be present in configuration.
  • for an updated pyramid (with ancestor) : informations are collected in the ancestor pyramid’s descriptor, fillFromAncestor is called.

Informations are checked, using perl classes like NoData, Level, PyrImageSpec...

Parameters (list)

paramsAll parameters about a pyramid’s format (new or update).
path_tempstring - Directory path, where to write the temporary old cache list, if not exist.

Ancestor informations extracter

fillFromAncestor

sub fillFromAncestor

We want to update an old pyramid with new data.  We have to collect attributes’ value in old pyramid descriptor and old cache.  They have priority to parameters.  If the old cache doesn’t have a list, we create temporary one.

Parameters (list)

paramshash - Used to store extracted informations.
path_tempstring - Directory path, where to write the temporary old cache list, if not exist.

See Also

readConfPyramid, readCachePyramid

readConfPyramid

sub readConfPyramid

Parse an XML file, a pyramid’s descriptor (file.pyr) to pick up informations.  We identify levels which are present in the old pyramid (not necessaraly the same in the new pyramid).

Parameters (list)

filepyramidstring - Complete absolute descriptor path.
paramshash - Used to store extracted informations.

readCachePyramid

sub readCachePyramid

Browse old cache.  We store images (data and nodata) in a file and broken symbolic links in an array.  This function is needed if the ancestor pyramid doesn’t own a content list.

Parameters (list)

cachedirstring - Root directory to browse.
listpyramidstring - File path, where to write files’ list.

See Also

findImages

findImages

sub findImages

Recursive method to browse a file tree structure.  Store directories, images (data and nodata) and broken symbolic links.

Parameters (list)

directorystring - Root directory to browse.
LISTstream - Stream to the file, in which we write old cache list (target files, no link).
brokenlinksstring array reference - Filled with broken links.
cacherootsstring hash reference - Filled with different pyramids’ roots and the corresponding identifiant.

isUpdateMode

sub isUpdateMode

Tests if the value for parameter ‘update_mode’ is allowed.

Parameters (list)

updateModeValuestring - chosen value for the mode of reference to the old pyrammid cache files

Level and limits methods

updateLevels

sub updateLevels

Determine top and bottom for the new pyramid and create Level objects.

Parameters (list)

DSLDataSourceLoader - Data sources, to determine extrem levels.
topIDstring - Optionnal, top level ID from the ‘pyramid’ section in the configuration file

createLevels

sub createLevels

Create all objects Level between the global top and the bottom levels (from data sources) for the new pyramid.

If there are an old pyramid, some levels already exist.  We don’t create twice the same level.

Parameters (list)

bottomOrderinteger - Bottom level order
topOrderinteger - Top level order

addLevel

sub addLevel

Store the Level object in the Pyramid object.  Return an error if the level already exists.

Parameters level - string - TM identifiant objLevel - Level - Level object to store

updateTMLimits

sub updateTMLimits

Compare old extrems rows/columns of the given level with the news and update values.

Parameters (list)

levelstring - Level ID whose extrems have to be updated with following bbox
bboxdouble array - [xmin,ymin,xmax,ymax], to update TM limits

Pyramid’s elements writers

writeConfPyramid

sub writeConfPyramid

Export the Pyramid object to XML format, write the pyramid’s descriptor (pyr_desc_path/pyr_name_new.pyr).  Use Level XML export.  Levels are written in descending order, from worst to best resolution.

writeListPyramid

sub writeListPyramid

Write the pyramid list.

If ancestor

  • transpose old pyramid directories in the new pyramid (using the pyramid list).
  • create symbolic links toward old pyramid tiles.
  • create the new pyramid list (just with unchanged images).
  • remove roots which are no longer used

If new pyramid

  • create the new pyramid list : just the root 0.

Parameters (list)

forestForest - Forest linked to the pyramid, to test if an image is present in the new pyramid.

writeCachePyramid

sub writeCachePyramid

Write the Cache Directory Structure (CDS).

  • create an image directory for each level.
  • create a mask directory for each level, if asked.
  • create the nodata tile for each level, if not exists (add in the list).

Getters - Setters

ownMasks

sub ownMasks

ownMetadata

sub ownMetadata

isNewPyramid

sub isNewPyramid

getNewName

sub getNewName

getNewDescriptorFile

sub getNewDescriptorFile

getNewDescriptorDir

sub getNewDescriptorDir

getNewListFile

sub getNewListFile

getNewDataDir

sub getNewDataDir

getOldName

sub getOldName

getOldDescriptorFile

sub getOldDescriptorFile

getOldListFile

sub getOldListFile

getOldDataDir

sub getOldDataDir

getUpdateMode

sub getUpdateMode

getTmsName

sub getTmsName

getSRS

sub getSRS

getTileMatrixSet

sub getTileMatrixSet

getDirImage

sub getDirImage

Returns image directory, just ethe name or the complete path

Examples

  • $objPyr->getDirImage() returns “IMAGE”
  • $objPyr->getDirImage(FALSE) returns “IMAGE”
  • $objPyr->getDirImage(TRUE) returns “/home/ign/PYRAMID/IMAGE”

Parameters (list)

absoluteboolean - If we want complete directory path.  Optionnal, FALSE by default.

getDirMask

sub getDirMask

Returns mask directory, just the name or the complete path

Examples

  • $objPyr->getDirMask() returns “MASK”
  • $objPyr->getDirMask(FALSE) returns “MASK”
  • $objPyr->getDirMask(TRUE) returns “/home/ign/PYRAMID/MASK”

Parameters (list)

absoluteboolean - If we want complete directory path.  Optionnal, FALSE by default.

getDirNodata

sub getDirNodata

Returns nodata directory, just the name or the complete path

Examples

  • $objPyr->getDirNodata() returns “NODATA”
  • $objPyr->getDirNodata(FALSE) returns “NODATA”
  • $objPyr->getDirNodata(TRUE) returns “/home/ign/PYRAMID/NODATA”

Parameters (list)

absoluteboolean - If we want complete directory path.  Optionnal, FALSE by default.

getDirDepth

sub getDirDepth

getInterpolation

sub getInterpolation

getGamma

sub getGamma

getCompression

sub getCompression

getCompressionOption

sub getCompressionOption

getFormatCode

sub getFormatCode

getPixel

sub getPixel

getSamplesPerPixel

sub getSamplesPerPixel

getPhotometric

sub getPhotometric

getBitsPerSample

sub getBitsPerSample

getSampleFormat

sub getSampleFormat

getNodata

sub getNodata

getNodataValue

sub getNodataValue

getTopOrder

sub getTopOrder

getBottomOrder

sub getBottomOrder

getLevel

sub getLevel

Parameters (list)

levelstring - Level ID

getLevels

sub getLevels

getOrderfromID

sub getOrderfromID

Returns the tile matrix order from the ID.

  • 0 (bottom level, smallest resolution)
  • NumberOfTM-1 (top level, biggest resolution).

Parameters (list)

IDstring - Level identifiant, whose order we want.

getIDfromOrder

sub getIDfromOrder

Returns the tile matrix ID from the ascending resolution order (integer).

  • 0 (bottom level, smallest resolution)
  • NumberOfTM-1 (top level, biggest resolution).

Parameters (list)

orderinteger - Level order, whose identifiant we want.

getCacheImageSize

sub getCacheImageSize

Returns the pyramid’s image’s pixel width and height as the double list (width, height), for a given level.

Parameters (list)

levelstring - Level ID

getCacheImageWidth

sub getCacheImageWidth

Returns the pyramid’s image’s pixel width, for a given level.

Parameters (list)

levelstring - Level ID

getCacheImageHeight

sub getCacheImageHeight

Returns the pyramid’s image’s pixel height, for a given level.

Parameters (list)

levelstring - Level ID

getTileWidth

sub getTileWidth

Returns the tile’s pixel width, for a given level.

Parameters (list)

levelstring - Level ID

getTileHeight

sub getTileHeight

Returns the tile’s pixel height, for a given level.

Parameters (list)

levelstring - Level ID

getTilesPerWidth

sub getTilesPerWidth

getTilesPerHeight

sub getTilesPerHeight

Export methods

exportForDebug

sub exportForDebug

Returns all pyramid’s information.  Useful for debug.

Example

Object BE4::Pyramid :
     New cache :
            - Name : JC
            - Descriptor path : /home/ign/desc
            - Data path : /home/ign/data
     Directories' name (depth = 2):
            - Data : IMAGE
            - Nodata : NODATA
            - Mask : MASK
     Image size (in pixel):
            - width : 16
            - height : 16
     Image components :
Object BE4::PyrImageSpec :
     Global information :
            - Compression : raw
            - Compression option : none
            - Interpolation : bicubic
            - Gamma : 1
            - Format code : TIFF_RAW_INT8
     Pixel components :
Object BE4::Pixel :
     Bits per sample : 8
     Photometric : rgb
     Sample format : uint
     Samples per pixel : 1


     TMS : LAMB93_10cm
     Number of levels : 0

Details

Details about pyramid’s working.

Pyramid’s Descriptor

Path template: pyr_desc_path/pyr_name_new.pyr

The pyramid descriptor is written in pyr_desc_path contains global informations about the cache.

<?xml version='1.0' encoding='US-ASCII'?>
<Pyramid>
    <tileMatrixSet>LAMB93_10cm</tileMatrixSet>
    <format>TIFF_RAW_INT8</format>
    <channels>3</channels>
    <nodataValue>FFFFFF</nodataValue>
    <interpolation>bicubic</interpolation>
    <photometric>rgb</photometric>
        .
    (levels)
        .
</Pyramid>

And details about each level.

<level>
    <tileMatrix>level_5</tileMatrix>
    <baseDir>./BDORTHO/IMAGE/level_5/</baseDir>
    <mask>
        <baseDir>./BDORTHO/MASK/level_5/</baseDir>
    </mask>
    <tilesPerWidth>16</tilesPerWidth>
    <tilesPerHeight>16</tilesPerHeight>
    <pathDepth>2</pathDepth>
    <nodata>
        <filePath>./BDORTHO/NODATA/level_5/nd.tif</filePath>
    </nodata>
    <TMSLimits>
        <minTileRow>365</minTileRow>
        <maxTileRow>368</maxTileRow>
        <minTileCol>1026</minTileCol>
        <maxTileCol>1035</maxTileCol>
    </TMSLimits>
</level>

For a new pyramid, all level between top and bottom are saved into.

For an update, all level of the existing pyramid are duplicated and we add new levels (between top and bottom levels).  For levels which are present in the old and the new pyramids, we update TMS limits.

Cache’s List

Path template: pyr_desc_path/pyr_name_new.list

Header : index for caches’ roots (used by paths, in the following list).  0 is always for the new cache.

0=/home/theo/TEST/BE4/PYRAMIDS/ORTHO_RAW_LAMB93_D075-E
1=/home/theo/TEST/BE4/PYRAMIDS/ORTHO_RAW_LAMB93_D075-O

A separator : #, necessary.

#

Images’ list : just real files, links’ targets.

1/NODATA/11/nd.tif
1/NODATA/7/nd.tif
.
.
.
1/IMAGE/16/00/1A/CV.tif
1/IMAGE/17/00/2L/PR.tif
.
.
.
0/IMAGE/0/00/00/00.tif
0/IMAGE/1/00/00/00.tif
0/IMAGE/2/00/00/00.tif
0/IMAGE/3/00/00/00.tif

The new cache’s list is written by writeCachePyramid, using the old cache’s list.  The file is completed by Process, to add generated images.

Cache Directory Structure

For a new pyramid, the directory structure is empty, only the level directory for images and directory and tile for nodata are written.

pyr_data_path/
        |_ pyr_name_new/
                |__dir_image/
                        |_ ID_LEVEL0/
                        |_ ID_LEVEL1/
                        |_ ID_LEVEL2/
                |__dir_nodata/
                        |_ ID_LEVEL0/
                                |_ nd.tif
                        |_ ID_LEVEL1/
                                |_ nd.tif
                        |_ ID_LEVEL2/
                                |_ nd.tif

For an existing pyramid, the directory structure is duplicated to the new pyramid with all file linked, thanks to the old cache list.  The kind of linking can be chosen between symbolic link (default), hard link (does not work if the new pyramid and the old one are stored in different file systems) and hard copy.

pyr_data_path/
        |__pyr_name_new/
                |__dir_image/
                        |_ ID_LEVEL0/
                            |_ 00/
                                |_ 7F/
                                |_ 7G/
                                    |_ CV.tif
                            |__ ...
                        |__ ID_LEVEL1/
                        |__ ID_LEVEL2/
                        |__ ...
                |__dir_nodata/
                        |_ ID_LEVEL0/
                                |_ nd.tif
                        |__ ID_LEVEL1/
                        |__ ID_LEVEL2/
                        |__ ...

with
    ls -l CV.tif
    CV.tif -> /pyr_data_path_old/pyr_name_old/dir_image/ID_LEVEL0/7G/CV.tif
and
    ls -l nd.tif
    nd.tif -> /pyr_data_path_old/pyr_name_old/dir_nodata/ID_LEVEL0/nd.tif

So be careful when you create a new tile in an updated pyramid, you have to test if the link exists, to use image as a background.

Rule Image/Directory Naming

We consider the upper left corner coordinates (X,Y).  We know the ground size of a cache image (do not mistake for a tile) : it depends on the level (defined in the TMS).

For the level

  • Resolution (2 m)
  • Tile pixel size: tileWidth and tileHeight (256 * 256)
  • Origin (upper left corner): X0,Y0 (0,12000000)

For the cache

  • image tile size: image_width and image_height (16 * 16)

GroundWidth = tileWidth * image_width * Resolution

GroundHeight = tileHeight * image_height * Resolution

Index X = int (X-X0)/GroundWidth

Index Y = int (Y0-Y)/GroundHeight

Index X base 36 (write with 3 number) = X2X1X0 (example: 0D4)

Index Y base 36 (write with 3 number) = Y2Y1Y0 (example: 18Z)

The image path, from the data root is : dir_image/levelID/X2Y2/X1Y1/X0Y0.tif (example: IMAGE/level_15/01/D8/4Z.tif)

my $STRPYRTMPLT
Define the template XML for the pyramid’s descriptor.
my %DEFAULT
Define default values for directories’ names.
my @UPDATE_MODES
Defines possibles values for the ‘update_mode’ parameter.
sub new
Pyramid constructor.
sub _init
We detect missing parameters and define default values for pyramids’ name and path (for the new one and the ancestor).
sub _load
We have to collect pyramid’s attributes’ values
sub fillFromAncestor
We want to update an old pyramid with new data.
sub readConfPyramid
Parse an XML file, a pyramid’s descriptor (file.pyr) to pick up informations.
sub readCachePyramid
Browse old cache.
sub findImages
Recursive method to browse a file tree structure.
sub isUpdateMode
Tests if the value for parameter ‘update_mode’ is allowed.
sub updateLevels
Determine top and bottom for the new pyramid and create Level objects.
sub createLevels
Create all objects Level between the global top and the bottom levels (from data sources) for the new pyramid.
sub addLevel
Store the Level object in the Pyramid object.
sub updateTMLimits
Compare old extrems rows/columns of the given level with the news and update values.
sub writeConfPyramid
Export the Pyramid object to XML format, write the pyramid’s descriptor (pyr_desc_path/pyr_name_new.pyr).
sub writeListPyramid
Write the pyramid list.
sub writeCachePyramid
Write the Cache Directory Structure (CDS).
sub ownMasks
sub ownMetadata
sub isNewPyramid
sub getNewName
sub getNewDescriptorFile
sub getNewDescriptorDir
sub getNewListFile
sub getNewDataDir
sub getOldName
sub getOldDescriptorFile
sub getOldListFile
sub getOldDataDir
sub getUpdateMode
sub getTmsName
sub getSRS
sub getTileMatrixSet
sub getDirImage
Returns image directory, just ethe name or the complete path
sub getDirMask
Returns mask directory, just the name or the complete path
sub getDirNodata
Returns nodata directory, just the name or the complete path
sub getDirDepth
sub getInterpolation
sub getGamma
sub getCompression
sub getCompressionOption
sub getFormatCode
sub getPixel
sub getSamplesPerPixel
sub getPhotometric
sub getBitsPerSample
sub getSampleFormat
sub getNodata
sub getNodataValue
sub getTopOrder
sub getBottomOrder
sub getLevel
sub getLevels
sub getOrderfromID
Returns the tile matrix order from the ID.
sub getIDfromOrder
Returns the tile matrix ID from the ascending resolution order (integer).
sub getCacheImageSize
Returns the pyramid’s image’s pixel width and height as the double list (width, height), for a given level.
sub getCacheImageWidth
Returns the pyramid’s image’s pixel width, for a given level.
sub getCacheImageHeight
Returns the pyramid’s image’s pixel height, for a given level.
sub getTileWidth
Returns the tile’s pixel width, for a given level.
sub getTileHeight
Returns the tile’s pixel height, for a given level.
sub getTilesPerWidth
sub getTilesPerHeight
sub exportForDebug
Returns all pyramid’s information.
Store all image’s components.
Load and store all information about a Tile Matrix Set.
Define Nodata informations and tools.
Describe a level in a pyramid.
Loads, validates and manages data sources.
Creates and manages all graphs, NNGraph and QTree.
Close