StatMap ETL - GeoPackageCreator

Transforming raster data into Earthlight readable GeoPackage

Importing raster data into Earthlight requires you to translate the source data into GeoPackage. In order to do so, you have to use StatMap GeoPackageCreator – a Windows console application that was designed to transform raster data into Earthlight readable GeoPackage file.

GeoPackageCreator configuration file

StatMap GeoPackageCreator can be found in the StatMap ETL folder in the Tools subfolder. However, the individual job configuration files and the batch execution files are located in GeoPackageCreator_Config folder.

StatMap GeoPackageCreator stores its job configuration parameters in an XML format file. A typical job configuration looks as follows:

<?xml version="1.0"?> <JobParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <JobName>Create</JobName> <InputDirectory>c:\SourceData\OS 25k\</InputDirectory> <OutputDirectory>c:\SourceData\OS 25k\proc</OutputDirectory> <GeopackageFileName>OS_25k_Colour_Raster</GeopackageFileName> <QualityOfLevel0>90</QualityOfLevel0> <QualityOfPyramid>75</QualityOfPyramid> <SourceCoordinateSystem>EPSG:27700</SourceCoordinateSystem> <TargetCoordinateSystem>EPSG:27700</TargetCoordinateSystem> <CreatePyramid>true</CreatePyramid> <PyramidLevels>2 4 8</PyramidLevels> <TileFormat>PNG_JPEG</TileFormat> <ResamplingAlgorithm>lanczos</ResamplingAlgorithm> </JobParameters>

 

Below is a detailed explanation of each parameter of the job:

  1. JobName – controls how extensive the GeoPackage processing will be. There are two possible options:

    • Create – a GeoPackage will be created with full raster pyramid inside.

    • OnlyAddo – extend an existing GeoPackage that stores just the base of the pyramid by adding the remaining levels.

  2. InputDirectory – path to the location where the source of your raster data resides. Please note that it is highly recommended for this folder to be local from to the application.

  3. OutputDirectory – details of the location where the resulting GeoPackage file ought to be created. As with the InputDirectory it is highly recommended for this folder to be local to the application.

  4. GeoPackageFileName – as the name suggests this parameter controls the GeoPackage file name.

  5. QualityOfLevel0 – compression level of the images of the base (Level 0) of the raster pyramid.

  6. QualityOfPyramid – compression level of the images on all other levels of the raster pyramid

  7. SourceCoordinateSystem – coordinate system that will be assumed when processing raster dataset. If the CRS cannot be determined from the source data, one has to be entered here. Please use the CRS value from the EPSG catalogue.

  8. TargetCoordinateSystem – coordinate system of the resulting pyramid. If you want to warp the source data into another projection, please enter a value here that is different from the SourceCoordinateSystem. Please use the CRS value from the EPSG catalogue.

  9. CreatePyramid – when set to true in addition to transforming the raster from the source format into GeoPackage, the application will also create the entire raster pyramid inside the GeoPackage container.

  10. PyramidLevels – indicates what scaling will be used when creating pyramid levels.

  11. TileFormat – indicates what format the individual tiles are in. The PNG_JPEG mixed content is the optimal for all datasets as it gives the best result in terms of imagery quality and output file size.

  12. ResamplingAlgorithm – image resampling algorithm used for rescaling operation. Lanczos is the best algorithm from the list of available methods in terms of overall quality.

Out of the 13 parameters described above there are just a few that you should modify.

These are:

  • InputDirectory

  • OutputDirectory

  • GeoPackageFileName

And in very rare occasions:

  • SourceCoordinateSystem

  • TargetCoordinateSystem

The rest, although exposed in the job configuration file should not be modified. The configuration of those parameters was extensively tested and these values give optimal results regardless of the source raster that is provided.

Executing GeoPackageCreator job

Next to each GeoPackage job configuration XML file is an accompanying BAT execution file.