GeodataPipeline

Description

sealed class Tinman.AddOns.Scenes.GeodataPipeline

Derived from

Disposable abstract

Full source code is included in the Tinman 3D SDK download.

An example pipeline for importing geodata.

This class sets up a simple processing pipeline for importing geodata into a 3D terrain. Processing can be performed up-front in a separate pre-processing step or at runtime to add new data on-the-fly.

Public / Constructors

Geodata​Pipeline


public constructor GeodataPipeline → (3)

content in : Path

[not-null]
Path to the geodata content directory (see remarks).

datum in : GeodeticDatum

[not-null]
The datum to use for the geographic cubemap datasets.

vertical in : VerticalRange

The vertical coordinate range to use for the geographic cubemap dataset.

Creates a new instance of GeodataPipeline.

Public / Methods

Build​Dataset


[OwnerReturn]
public method BuildDataset → (1)

path in : Path

Path to the geodata file to process.

returns → bool

true if path in has been processed,
false if it has been skipped because it is up-to-date.

Processes the given geodata file.

For a geodata file named geodata.tif, the following ancillary sibling files are generated:

  1. geodata.cfg
    A config script (see ConfigScript) with a member named image that holds an image descriptor (see IImage) for geodata.tif. If the config script file does not exist, a default script will be created. Otherwise, the existing file is read, validated and reformatted.

  2. geodata.info
    The image descriptor (see IImage) that has been used to read the contents of the geodata file.

  3. geodata.json
    Holds metadata which is used to detect changes to the geodata file and the config script, in order to be able to trigger geodata processing only if necessary.

  4. geodata.error
    When geodata processing has failed, this file contains the error message (see TinmanError).

IOException

If an I/O error has occurred.

ValidatingException

If the syntax of geodata.cfg is malformed.

ConfigException

If the image descriptor configuration in geodata.cfg is invalid.

GeorefException

If the geo-reference of the geodata file is incomplete, malformed or not supported.

TinmanException

If an error has occurred while importing the geodata file into the dataset.

Build​Datasets


[OwnerReturn]
public method BuildDatasets → (1)

progress opt : IProgressMonitor = null

The progress monitor to use or null for none.

Builds the geodata heightmap.

IOException

If an I/O error has occurred.

Collect​Heightmaps


[OwnerReturn]
public method CollectHeightmaps → (1)

layers opt : HeightmapLayer = HeightmapLayer.All

Optional heightmap layer mask to apply.

returns → IHeightmap

The merged heightmap or null if no matching heightmap datasets are present.

Collects all heightmap datasets that are present in the content directory and merges them into a single heightmap.

IOException

If an I/O error has occurred.

Public / Attributes

Content


public attribute Content → (get)

value : Path

[not-null]
Canonical path to the geodata content directory.

The path to the geodata content directory.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.