MapLink Pro .
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
envitia::MapLinkProject Class Reference

Manage a map-building project, its layers, datasets and output maps. More...

Detailed Description

Manage a map-building project, its layers, datasets and output maps.

Classes

Public Types

using interval_t = interval<double, interval_type::closed, interval_type::closed>
using bounds_t = bounds<double, interval_type::closed, interval_type::closed>

Public Member Functions

 MapLinkProject ()
 Construct a project with the default environment and configuration.
 MapLinkProject (std::filesystem::path maplHome, std::filesystem::path userIni)
 Construct a project with the specified MapLink home and user configuration paths.
 ~MapLinkProject ()
 Release resources held by the project.
bool CreateMap (std::filesystem::path const &path, std::optional< OutputMapOptions > options={})
 Create an output map containing the selected layers.
bool CreateMapAtVersion (std::filesystem::path const &path, TSLMapLinkVersion mlVersion)
 Create an output map at a specified MapLink version.
bool SelectAllLayersForMap ()
 Select every layer for the next output map.
bool SelectLayersForMap (const std::vector< std::string > &layerNames, const char *commandStr=0)
 Select the named layers for the next output map.
InformationTreeItem * findLayer (const std::string &layer)
 Find a layer by name in this project.
InformationTreeItem * findDataset (const std::string &layer, const std::string &dataset)
 Find a dataset by layer and dataset names.
InformationTreeItem * findDataset (const std::string &layer_dataset)
 Find a dataset by its combined layer/dataset path.
std::vector< InformationTreeItem * > findLayers (std::vector< std::string > const &layers)
 Find the layers named in a list.
std::vector< InformationTreeItem * > findDatasets (std::vector< std::string > const &dataset_paths)
 Find the datasets at the supplied paths.
bool SetDatasetInputClipping (InformationTreeItem *dataset, bounds_t bounds)
 Set a dataset's input clipping bounds.
std::optional< bounds_t > GetDatasetInputClipping (InformationTreeItem *dataset)
 Get a dataset's input clipping bounds, if configured.
bool DisableDatasetInputClipping (InformationTreeItem *dataset)
 Disable input clipping for a dataset.
bool SetAllDatasetsInputClipping (bounds_t bounds)
 Set input clipping bounds for all datasets in the project.
bool SetGeodeticClipping (InformationTreeItem *layer, interval_t latitude, interval_t longitude)
 Set a layer's latitude and longitude clipping intervals.
bool GetGeodeticClipping (InformationTreeItem *layer, interval_t &latitude, interval_t &longitude)
 Retrieve a layer's latitude and longitude clipping intervals.
bool DisableGeodeticClipping (InformationTreeItem *layer)
 Disable geodetic clipping for a layer.
bool SetOutputClipping (InformationTreeItem *layer, bounds_t bounds)
 Set a layer's output clipping bounds.
bool GetOutputClipping (InformationTreeItem *layer, bounds_t &bounds)
 Retrieve a layer's output clipping bounds.
bool DisableOutputClipping (InformationTreeItem *layer)
 Disable output clipping for a layer.
bool getDatasetInputExtent (InformationTreeItem *dataset, double *x1, double *y1, double *x2, double *y2)
 Query a dataset's extent in input coordinate system units.
bool getDataInputExtent (const std::string &layer, const std::string &dataset, const std::string &data, double *x1, double *y1, double *x2, double *y2)
 Query a datafile's extent in input coordinate system units.
bool setMapCoordinateSystem (const std::string &coordinateSystemName)
 Set the map's coordinate system by name.
bool getMapCoordinateSystem (std::string &coordinateSystemName) const
 Retrieve the name of the map's coordinate system.
long getMapCoordinateSystemID () const
 Retrieve the map's coordinate system identifier.
bool setDatasetCoordinateSystem (InformationTreeItem *dataset, const std::string &coordinateSystemName)
 Set a dataset's coordinate system by name.
void getLayerNames (std::vector< std::string > &layerNames)
 Retrieve the project's layer names.
void getDatasetNames (const std::string &layer, std::vector< std::string > &datasetNames)
 Retrieve dataset names for a named layer.
void getDatafileNames (const std::string &layer, const std::string &dataset, std::vector< std::string > &datafileNames)
 Retrieve datafile names for a named layer and dataset.
std::string datasetFilterName (InformationTreeItem *dataset)
 Return the filter name used by a dataset.
bool CreateTerrainDatabase (std::filesystem::path const &path)
 Create an output terrain database at the given path.
bool MapTMCperMU (short tmcPerMU, int tmcBorderPercentage)
 Set the map's TMC-per-MU scale and border percentage.
bool MUToTMCTransform (bool automatic, double MUShiftX, double MUShiftY, long TMCPerMU, int tmcBorderPercentage)
 Configure the map-unit to TMC transform.
bool MUToTMCTransform (bool *automatic, double *MUShiftX, double *MUShiftY, long *TMCPerMU, int *tmcBorderPercentage)
 Retrieve the map-unit to TMC transform settings.
bool CreateDTED (char const *dtedName, short dtedLevel)
 Create DTED output at the specified level.
bool getLayerExtent (InformationTreeItem *layer, double *x1, double *y1, double *x2, double *y2)
 Get a layer's transformed output extent.
bool setLayerTilingFixedNumber (InformationTreeItem *layer, short numTilesAcross, short numTilesDown)
 Tile a layer using a fixed number of tiles across and down.
bool setLayerTilingFixedSize (InformationTreeItem *layer, double tileWidth, double tileHeight)
 Tile a layer using a fixed tile size in output coordinate system units.
bool disableLayerTiling (InformationTreeItem *layer)
 Disable tiling for a layer.
bool isLayerTilingEnabled (InformationTreeItem *layer, bool *isTilingFixedNumber)
 Query whether a layer is tiled and which tiling mode is used.
bool queryLayerTilingFixedNumber (InformationTreeItem *layer, short *numTilesAcross, short *numTilesDown)
 Retrieve a layer's fixed tile counts.
bool queryLayerTilingFixedSize (InformationTreeItem *layer, double *tileWidth, double *tileHeight)
 Retrieve a layer's fixed tile size.
bool getFeatureBookSectionNames (std::vector< std::string > &sectionNames)
 Retrieve the names of all feature-book sections.
MaplEditorFeatureBookSection * createFeatureBookSection (std::string const &name)
 Create a feature-book section with the given name.
MaplEditorFeatureBookSection * findFeatureBookSection (std::string const &name)
 Find a feature-book section by name.
InformationTreeItem * createDataset (InformationTreeItem *layer, TileFilter *datasetType, MaplEditorFeatureBookSection *featureBookSection, const std::string *datasetName=0)
 Create a dataset in a layer with the specified filter and feature-book section.
bool addData (InformationTreeItem *dataset, std::filesystem::path const &path)
 Add a datafile to a dataset.
std::size_t addDataToAllDatasets (std::filesystem::path const &path)
 Add a datafile to every dataset that accepts it.
bool loadFeatureBook (std::filesystem::path const &path)
 Load a feature book from disk.
std::vector< std::filesystem::path > getDataPaths (InformationTreeItem *dataset)
 Get the paths of datafiles in a dataset.
MapLinkDatasetTypeEnum DatasetType (InformationTreeItem *dataset)
 Query whether a dataset is vector, raster or terrain data.
void enableAutomaticRasterOverviews (bool enable)
 Enable or disable automatic raster overviews.
bool enableAutomaticRasterOverviews ()
 Query whether automatic raster overviews are enabled.
void rasterOverviewResolutionStep (double stepPercent)
 Set the raster overview resolution step as a percentage.
double rasterOverviewResolutionStep ()
 Get the raster overview resolution step percentage.
void rasterOverviewFixedResolution (double res)
 Set the raster overview fixed resolution.
double rasterOverviewFixedResolution ()
 Get the raster overview fixed resolution.
void rasterOverviewBaseName (const std::string &name)
 Set the base name of generated raster overviews.
std::string rasterOverviewBaseName ()
 Get the base name of generated raster overviews.
bool create (uint64_t projectID=time(nullptr))
 Create a new project with an optional project identifier.
bool load (std::filesystem::path path)
 Load a project from disk.
bool save (std::filesystem::path path)
 Save the project to disk.
void deleteDataset (const std::string &layerName, const std::string &datasetName, int featureBookSection)
 Remove a dataset from a named layer and feature-book section.
MapInformation * getMapInformation ()
 Access the project's map information.
void convertColourIndices (bool newval)
 Enable or disable conversion of colour indices.
bool convertColourIndices ()
 Query whether colour indices are converted.
void generateMetadataOnMapCreation (bool newval)
 Enable or disable metadata generation when creating a map.
bool generateMetadataOnMapCreation ()
 Query whether metadata is generated when creating a map.
const MaplEditorAnalyseInfo * analyseData (const std::string &layer, const std::string &dataset, const std::string &datafile, TSLFilterErrorCode &error, TSLFilterAnalyseCallbackStruct *callbacks, unsigned long &catalogueID, bool forceAnalyse, bool useMainCatInfo=false)
 Analyse a datafile in the named layer and dataset.
void recatalogueAllFilesInProject (InformationTreeItem *parent)
 Recatalogue the files beneath the specified project item.
void getCodePages (const std::string &key, std::set< int > &codePages)
 Retrieve the code pages associated with a catalogue key.
void getShpMifLatin1 (const std::string &key, std::vector< bool > &settings)
 Retrieve Shapefile/MIF Latin-1 settings for a catalogue key.
void getOsMastermapLatin1 (const std::string &key, std::vector< bool > &settings)
 Retrieve OS MasterMap Latin-1 settings for a catalogue key.
bool datasetDropped () const
 Query whether a dataset was dropped from the project.
void getAllCatalogueInformationForDataset (InformationTreeItem *datasetNode, std::list< const MaplEditorAnalyseInfo * > &infos)
 Collect catalogue analysis information for a dataset.
void invalidateDatasetsUsing (const MaplEditorFeatureNode *section)
 Invalidate datasets using a feature-book section.
int mapLinkVersion () const
 Get the MapLink output version configured for this project.
void mapLinkVersion (int ver)
 Set the MapLink output version configured for this project.
void launchExternalProcessor (const std::string &processorName, const std::string &executable, const std::vector< std::string > &args)
 Launch an external processor with the specified executable and arguments.
std::vector< InformationTreeItem * > getAllLayers ()
 Get the project's layer items.
std::vector< InformationTreeItem * > getAllDatasets ()
 Get the project's dataset items.
InformationTreeItem * newLayer (std::string const &reqdLayerName, LayerInformation *layerInfo=0)
 Add a new layer with the requested name.

Class Documentation

◆ envitia::MapLinkProject::config

struct envitia::MapLinkProject::config

Configuration values for a map-building project.

Class Members
bool autoloadFiles
int autoTileScreenSizeX
int autoTileScreenSizeY
win_colorref backgroundColour
string cacheDir
bool cacheFiles
bool complexPoly
FeatureMaskMode defaultFeatureMaskMode
string defaultOutputDirectory
string defaultProjectTemplate
bool enterpriseCompression
bool exportFCC
bool generateMetadataAsISO19139
bool generateMetadataCodeListFormatEx
bool generateSymbolsWithLineLabelling
GLDataPostProcessorOptions glPostProcessorOptions
bool ignoreUserSuppliedCoordinateSystem
bool keyhole
MapMetadataDefaults mapMetadataDefaults
int maxPyramidLayerLevel
int maxRasterMemoryCacheSizeMB
unsigned mtRasterProjection
unsigned mtRasterPyramiding
bool multiPageTifs
TSLTextEncoding oldFileFormatTextEncodingOverride
bool optPyramidTileSize
int pyramidCompFactor
int pyramidFormat
int pyramidTileSize
RasterOverviewDefaults rasterOverviewDefaults
int rasterPreloadOption
bool reloadLayerSkip
int screensizeX
int screensizeY
int splitRastersThreshold
bool subdirLayers
bool terrainDatabaseDataTypeEnable
bool thumbnailRasters
bool useLowFragmentHeap
int vectorCacheMemorySizeMb
int vectorFilterFilePageThreshold
int vectorFilterPageSize
WMSConfigurationDefaults wmsConfigurationDefaults

Member Typedef Documentation

◆ bounds_t

◆ interval_t

Constructor & Destructor Documentation

◆ MapLinkProject() [1/2]

envitia::MapLinkProject::MapLinkProject ( )

Construct a project with the default environment and configuration.

◆ MapLinkProject() [2/2]

envitia::MapLinkProject::MapLinkProject ( std::filesystem::path maplHome,
std::filesystem::path userIni )

Construct a project with the specified MapLink home and user configuration paths.

Parameters
maplHomePath to the MapLink installation.
userIniPath to the user configuration file.

◆ ~MapLinkProject()

envitia::MapLinkProject::~MapLinkProject ( )

Release resources held by the project.

Member Function Documentation

◆ addData()

bool envitia::MapLinkProject::addData ( InformationTreeItem * dataset,
std::filesystem::path const & path )

Add a datafile to a dataset.

Parameters
datasetDataset to receive the datafile.
pathPath to the datafile.
Returns
Whether the dataset accepted the file.

◆ addDataToAllDatasets()

std::size_t envitia::MapLinkProject::addDataToAllDatasets ( std::filesystem::path const & path)

Add a datafile to every dataset that accepts it.

Parameters
pathPath to the datafile.
Returns
Number of datasets that accepted the file.

◆ analyseData()

const MaplEditorAnalyseInfo * envitia::MapLinkProject::analyseData ( const std::string & layer,
const std::string & dataset,
const std::string & datafile,
TSLFilterErrorCode & error,
TSLFilterAnalyseCallbackStruct * callbacks,
unsigned long & catalogueID,
bool forceAnalyse,
bool useMainCatInfo = false )

Analyse a datafile in the named layer and dataset.

Parameters
layerName of the containing layer.
datasetName of the containing dataset.
datafileName of the datafile to analyse.
[out]errorReceives the filter error code.
callbacksOptional filter analysis callbacks.
[out]catalogueIDReceives the catalogue identifier.
forceAnalyseForce analysis even when catalogue information exists.
useMainCatInfoWhether to use main catalogue information.
Returns
Analysis information for the datafile, or nullptr if unavailable.

◆ convertColourIndices() [1/2]

bool envitia::MapLinkProject::convertColourIndices ( )

Query whether colour indices are converted.

Returns
Whether colour index conversion is enabled.

◆ convertColourIndices() [2/2]

void envitia::MapLinkProject::convertColourIndices ( bool newval)

Enable or disable conversion of colour indices.

Parameters
newvalWhether to convert colour indices.

◆ create()

bool envitia::MapLinkProject::create ( uint64_t projectID = time(nullptr))

Create a new project with an optional project identifier.

Parameters
projectIDIdentifier for the new project; defaults to the current time.
Returns
Whether the project was created.

◆ createDataset()

InformationTreeItem * envitia::MapLinkProject::createDataset ( InformationTreeItem * layer,
TileFilter * datasetType,
MaplEditorFeatureBookSection * featureBookSection,
const std::string * datasetName = 0 )

Create a dataset in a layer with the specified filter and feature-book section.

Parameters
layerLayer to contain the new dataset.
datasetTypeFilter used for the dataset.
featureBookSectionFeature-book section associated with the dataset.
datasetNameOptional name for the new dataset.
Returns
The new dataset item, or nullptr if creation fails.

◆ CreateDTED()

bool envitia::MapLinkProject::CreateDTED ( char const * dtedName,
short dtedLevel )

Create DTED output at the specified level.

Parameters
dtedNameDestination name for the DTED output.
dtedLevelDTED output level.
Returns
Whether the DTED output was created.

◆ createFeatureBookSection()

MaplEditorFeatureBookSection * envitia::MapLinkProject::createFeatureBookSection ( std::string const & name)

Create a feature-book section with the given name.

Parameters
nameName of the new section.
Returns
The created section, or nullptr if creation fails.

◆ CreateMap()

bool envitia::MapLinkProject::CreateMap ( std::filesystem::path const & path,
std::optional< OutputMapOptions > options = {} )

Create an output map containing the selected layers.

Parameters
pathDestination for the output map.
optionsOptional version, merge and vector optimisation settings.
Returns
Whether map creation succeeded.

◆ CreateMapAtVersion()

bool envitia::MapLinkProject::CreateMapAtVersion ( std::filesystem::path const & path,
TSLMapLinkVersion mlVersion )

Create an output map at a specified MapLink version.

Parameters
pathDestination for the output map.
mlVersionMapLink version for the output.
Returns
Whether map creation succeeded.

◆ CreateTerrainDatabase()

bool envitia::MapLinkProject::CreateTerrainDatabase ( std::filesystem::path const & path)

Create an output terrain database at the given path.

Parameters
pathDestination of the terrain database.
Returns
Whether the terrain database was created.

◆ datasetDropped()

bool envitia::MapLinkProject::datasetDropped ( ) const

Query whether a dataset was dropped from the project.

Returns
Whether a dataset was dropped.

◆ datasetFilterName()

std::string envitia::MapLinkProject::datasetFilterName ( InformationTreeItem * dataset)

Return the filter name used by a dataset.

Parameters
datasetDataset whose filter name is requested.
Returns
The dataset's filter name.

◆ DatasetType()

MapLinkDatasetTypeEnum envitia::MapLinkProject::DatasetType ( InformationTreeItem * dataset)

Query whether a dataset is vector, raster or terrain data.

Parameters
datasetDataset to query.
Returns
The dataset's type, or TSLMAPLINK_DatasetUnknown if it cannot be determined.

◆ deleteDataset()

void envitia::MapLinkProject::deleteDataset ( const std::string & layerName,
const std::string & datasetName,
int featureBookSection )

Remove a dataset from a named layer and feature-book section.

Parameters
layerNameName of the containing layer.
datasetNameName of the dataset to remove.
featureBookSectionFeature-book section associated with the dataset.

◆ DisableDatasetInputClipping()

bool envitia::MapLinkProject::DisableDatasetInputClipping ( InformationTreeItem * dataset)

Disable input clipping for a dataset.

Parameters
datasetDataset whose clipping is disabled.
Returns
Whether input clipping was disabled.

◆ DisableGeodeticClipping()

bool envitia::MapLinkProject::DisableGeodeticClipping ( InformationTreeItem * layer)

Disable geodetic clipping for a layer.

Parameters
layerLayer whose clipping is disabled.
Returns
Whether geodetic clipping was disabled.

◆ disableLayerTiling()

bool envitia::MapLinkProject::disableLayerTiling ( InformationTreeItem * layer)

Disable tiling for a layer.

Parameters
layerLayer whose tiling is disabled.
Returns
Whether layer tiling was disabled.

◆ DisableOutputClipping()

bool envitia::MapLinkProject::DisableOutputClipping ( InformationTreeItem * layer)

Disable output clipping for a layer.

Parameters
layerLayer whose output clipping is disabled.
Returns
Whether output clipping was disabled.

◆ enableAutomaticRasterOverviews() [1/2]

bool envitia::MapLinkProject::enableAutomaticRasterOverviews ( )

Query whether automatic raster overviews are enabled.

Returns
Whether automatic raster overviews are enabled; false if map properties are unavailable.

◆ enableAutomaticRasterOverviews() [2/2]

void envitia::MapLinkProject::enableAutomaticRasterOverviews ( bool enable)

Enable or disable automatic raster overviews.

Parameters
enableWhether to generate raster overviews automatically.

◆ findDataset() [1/2]

InformationTreeItem * envitia::MapLinkProject::findDataset ( const std::string & layer,
const std::string & dataset )

Find a dataset by layer and dataset names.

Parameters
layerName of the containing layer.
datasetName of the dataset to find.
Returns
The matching dataset, or nullptr if none is found.

◆ findDataset() [2/2]

InformationTreeItem * envitia::MapLinkProject::findDataset ( const std::string & layer_dataset)

Find a dataset by its combined layer/dataset path.

Parameters
layer_datasetCombined path identifying the dataset.
Returns
The matching dataset, or nullptr for an invalid path or missing dataset.

◆ findDatasets()

std::vector< InformationTreeItem * > envitia::MapLinkProject::findDatasets ( std::vector< std::string > const & dataset_paths)

Find the datasets at the supplied paths.

Parameters
dataset_pathsPaths identifying the datasets to find.
Returns
The requested dataset items in input order, or an empty vector if any is missing.

◆ findFeatureBookSection()

MaplEditorFeatureBookSection * envitia::MapLinkProject::findFeatureBookSection ( std::string const & name)

Find a feature-book section by name.

Parameters
nameName of the section to find.
Returns
The matching section, or nullptr if none is found.

◆ findLayer()

InformationTreeItem * envitia::MapLinkProject::findLayer ( const std::string & layer)

Find a layer by name in this project.

Parameters
layerName of the layer to find.
Returns
The matching layer, or nullptr if none is found.

◆ findLayers()

std::vector< InformationTreeItem * > envitia::MapLinkProject::findLayers ( std::vector< std::string > const & layers)

Find the layers named in a list.

Parameters
layersNames of the layers to find.
Returns
The requested layer items in input order, or an empty vector if any is missing.

◆ generateMetadataOnMapCreation() [1/2]

bool envitia::MapLinkProject::generateMetadataOnMapCreation ( )

Query whether metadata is generated when creating a map.

Returns
Whether metadata generation is enabled.

◆ generateMetadataOnMapCreation() [2/2]

void envitia::MapLinkProject::generateMetadataOnMapCreation ( bool newval)

Enable or disable metadata generation when creating a map.

Parameters
newvalWhether to generate map metadata.

◆ getAllCatalogueInformationForDataset()

void envitia::MapLinkProject::getAllCatalogueInformationForDataset ( InformationTreeItem * datasetNode,
std::list< const MaplEditorAnalyseInfo * > & infos )

Collect catalogue analysis information for a dataset.

Parameters
datasetNodeDataset whose catalogue information is requested.
[out]infosReceives the analysis information entries.

◆ getAllDatasets()

std::vector< InformationTreeItem * > envitia::MapLinkProject::getAllDatasets ( )

Get the project's dataset items.

Returns
The project's dataset items.

◆ getAllLayers()

std::vector< InformationTreeItem * > envitia::MapLinkProject::getAllLayers ( )

Get the project's layer items.

Returns
The project's layer items.

◆ getCodePages()

void envitia::MapLinkProject::getCodePages ( const std::string & key,
std::set< int > & codePages )

Retrieve the code pages associated with a catalogue key.

Parameters
keyCatalogue key to query.
[out]codePagesReceives the code pages.

◆ getDatafileNames()

void envitia::MapLinkProject::getDatafileNames ( const std::string & layer,
const std::string & dataset,
std::vector< std::string > & datafileNames )

Retrieve datafile names for a named layer and dataset.

Parameters
layerName of the containing layer.
datasetName of the containing dataset.
[out]datafileNamesReceives the datafile names.

◆ getDataInputExtent()

bool envitia::MapLinkProject::getDataInputExtent ( const std::string & layer,
const std::string & dataset,
const std::string & data,
double * x1,
double * y1,
double * x2,
double * y2 )

Query a datafile's extent in input coordinate system units.

Parameters
layerName of the containing layer.
datasetName of the containing dataset.
dataName of the datafile.
[out]x1Receives the lower X coordinate.
[out]y1Receives the lower Y coordinate.
[out]x2Receives the upper X coordinate.
[out]y2Receives the upper Y coordinate.
Returns
Whether the datafile extent was found.

◆ getDataPaths()

std::vector< std::filesystem::path > envitia::MapLinkProject::getDataPaths ( InformationTreeItem * dataset)

Get the paths of datafiles in a dataset.

Parameters
datasetDataset whose datafile paths are requested.
Returns
Paths of the datafiles in the dataset.

◆ GetDatasetInputClipping()

std::optional< bounds_t > envitia::MapLinkProject::GetDatasetInputClipping ( InformationTreeItem * dataset)

Get a dataset's input clipping bounds, if configured.

Parameters
datasetDataset whose clipping bounds are requested.
Returns
The configured bounds, or std::nullopt if clipping is disabled or the dataset is invalid.

◆ getDatasetInputExtent()

bool envitia::MapLinkProject::getDatasetInputExtent ( InformationTreeItem * dataset,
double * x1,
double * y1,
double * x2,
double * y2 )

Query a dataset's extent in input coordinate system units.

Parameters
datasetDataset whose extent is requested.
[out]x1Receives the lower X coordinate.
[out]y1Receives the lower Y coordinate.
[out]x2Receives the upper X coordinate.
[out]y2Receives the upper Y coordinate.
Returns
Whether the dataset extent was found.

◆ getDatasetNames()

void envitia::MapLinkProject::getDatasetNames ( const std::string & layer,
std::vector< std::string > & datasetNames )

Retrieve dataset names for a named layer.

Parameters
layerName of the containing layer.
[out]datasetNamesReceives the dataset names.

◆ getFeatureBookSectionNames()

bool envitia::MapLinkProject::getFeatureBookSectionNames ( std::vector< std::string > & sectionNames)

Retrieve the names of all feature-book sections.

Parameters
[out]sectionNamesReceives the section names.
Returns
Whether the section names were retrieved.

◆ GetGeodeticClipping()

bool envitia::MapLinkProject::GetGeodeticClipping ( InformationTreeItem * layer,
interval_t & latitude,
interval_t & longitude )

Retrieve a layer's latitude and longitude clipping intervals.

Parameters
layerLayer whose clipping intervals are requested.
[out]latitudeReceives the latitude interval.
[out]longitudeReceives the longitude interval.
Returns
Whether geodetic clipping is enabled; false also indicates a failed query.

◆ getLayerExtent()

bool envitia::MapLinkProject::getLayerExtent ( InformationTreeItem * layer,
double * x1,
double * y1,
double * x2,
double * y2 )

Get a layer's transformed output extent.

Parameters
layerLayer whose extent is requested.
[out]x1Receives the lower X coordinate.
[out]y1Receives the lower Y coordinate.
[out]x2Receives the upper X coordinate.
[out]y2Receives the upper Y coordinate.
Returns
Whether the layer extent was retrieved.

◆ getLayerNames()

void envitia::MapLinkProject::getLayerNames ( std::vector< std::string > & layerNames)

Retrieve the project's layer names.

Parameters
[out]layerNamesReceives the layer names.

◆ getMapCoordinateSystem()

bool envitia::MapLinkProject::getMapCoordinateSystem ( std::string & coordinateSystemName) const

Retrieve the name of the map's coordinate system.

Parameters
[out]coordinateSystemNameReceives the coordinate system name.
Returns
Whether the coordinate system was retrieved.

◆ getMapCoordinateSystemID()

long envitia::MapLinkProject::getMapCoordinateSystemID ( ) const

Retrieve the map's coordinate system identifier.

Returns
The coordinate system identifier, or 0 if none is available.

◆ getMapInformation()

MapInformation * envitia::MapLinkProject::getMapInformation ( )

Access the project's map information.

Returns
The project's map information, or nullptr if none is available.

◆ getOsMastermapLatin1()

void envitia::MapLinkProject::getOsMastermapLatin1 ( const std::string & key,
std::vector< bool > & settings )

Retrieve OS MasterMap Latin-1 settings for a catalogue key.

Parameters
keyCatalogue key to query.
[out]settingsReceives the Latin-1 settings.

◆ GetOutputClipping()

bool envitia::MapLinkProject::GetOutputClipping ( InformationTreeItem * layer,
bounds_t & bounds )

Retrieve a layer's output clipping bounds.

Parameters
layerLayer whose output clipping bounds are requested.
[out]boundsReceives the output clipping bounds.
Returns
Whether output clipping is enabled; false also indicates an invalid layer.

◆ getShpMifLatin1()

void envitia::MapLinkProject::getShpMifLatin1 ( const std::string & key,
std::vector< bool > & settings )

Retrieve Shapefile/MIF Latin-1 settings for a catalogue key.

Parameters
keyCatalogue key to query.
[out]settingsReceives the Latin-1 settings.

◆ invalidateDatasetsUsing()

void envitia::MapLinkProject::invalidateDatasetsUsing ( const MaplEditorFeatureNode * section)

Invalidate datasets using a feature-book section.

Parameters
sectionFeature-book section whose datasets should be invalidated.

◆ isLayerTilingEnabled()

bool envitia::MapLinkProject::isLayerTilingEnabled ( InformationTreeItem * layer,
bool * isTilingFixedNumber )

Query whether a layer is tiled and which tiling mode is used.

Parameters
layerLayer to query.
[out]isTilingFixedNumberReceives whether fixed tile counts are used.
Returns
Whether tiling is enabled for the layer.

◆ launchExternalProcessor()

void envitia::MapLinkProject::launchExternalProcessor ( const std::string & processorName,
const std::string & executable,
const std::vector< std::string > & args )

Launch an external processor with the specified executable and arguments.

Parameters
processorNameName identifying the processor.
executablePath to the processor executable.
argsArguments passed to the executable.

◆ load()

bool envitia::MapLinkProject::load ( std::filesystem::path path)

Load a project from disk.

Parameters
pathPath to the project file.
Returns
Whether the project was loaded.

◆ loadFeatureBook()

bool envitia::MapLinkProject::loadFeatureBook ( std::filesystem::path const & path)

Load a feature book from disk.

Parameters
pathPath to the feature book.
Returns
Whether the feature book was loaded.

◆ mapLinkVersion() [1/2]

int envitia::MapLinkProject::mapLinkVersion ( ) const

Get the MapLink output version configured for this project.

Returns
The configured MapLink output version.

◆ mapLinkVersion() [2/2]

void envitia::MapLinkProject::mapLinkVersion ( int ver)

Set the MapLink output version configured for this project.

Parameters
verOutput version to configure.

◆ MapTMCperMU()

bool envitia::MapLinkProject::MapTMCperMU ( short tmcPerMU,
int tmcBorderPercentage )

Set the map's TMC-per-MU scale and border percentage.

Parameters
tmcPerMUTMC units per map unit.
tmcBorderPercentageBorder percentage to apply.
Returns
Whether the map's scale settings were applied.

◆ MUToTMCTransform() [1/2]

bool envitia::MapLinkProject::MUToTMCTransform ( bool * automatic,
double * MUShiftX,
double * MUShiftY,
long * TMCPerMU,
int * tmcBorderPercentage )

Retrieve the map-unit to TMC transform settings.

Parameters
[out]automaticReceives whether automatic calculation is enabled.
[out]MUShiftXReceives the horizontal map-unit shift.
[out]MUShiftYReceives the vertical map-unit shift.
[out]TMCPerMUReceives TMC units per map unit.
[out]tmcBorderPercentageReceives the border percentage.
Returns
Whether the transform settings were retrieved.

◆ MUToTMCTransform() [2/2]

bool envitia::MapLinkProject::MUToTMCTransform ( bool automatic,
double MUShiftX,
double MUShiftY,
long TMCPerMU,
int tmcBorderPercentage )

Configure the map-unit to TMC transform.

Parameters
automaticWhether to calculate the transform automatically.
MUShiftXHorizontal map-unit shift.
MUShiftYVertical map-unit shift.
TMCPerMUTMC units per map unit.
tmcBorderPercentageBorder percentage to apply.
Returns
Whether the transform settings were applied.

◆ newLayer()

InformationTreeItem * envitia::MapLinkProject::newLayer ( std::string const & reqdLayerName,
LayerInformation * layerInfo = 0 )

Add a new layer with the requested name.

Parameters
reqdLayerNameRequested name for the new layer.
layerInfoOptional initial layer information.
Returns
The new layer item, or nullptr if it could not be created.

◆ queryLayerTilingFixedNumber()

bool envitia::MapLinkProject::queryLayerTilingFixedNumber ( InformationTreeItem * layer,
short * numTilesAcross,
short * numTilesDown )

Retrieve a layer's fixed tile counts.

Parameters
layerLayer to query.
[out]numTilesAcrossReceives the horizontal tile count.
[out]numTilesDownReceives the vertical tile count.
Returns
Whether the tile counts were retrieved.

◆ queryLayerTilingFixedSize()

bool envitia::MapLinkProject::queryLayerTilingFixedSize ( InformationTreeItem * layer,
double * tileWidth,
double * tileHeight )

Retrieve a layer's fixed tile size.

Parameters
layerLayer to query.
[out]tileWidthReceives the tile width.
[out]tileHeightReceives the tile height.
Returns
Whether the tile size was retrieved.

◆ rasterOverviewBaseName() [1/2]

std::string envitia::MapLinkProject::rasterOverviewBaseName ( )

Get the base name of generated raster overviews.

Returns
The configured base name, or an empty string if map properties are unavailable.

◆ rasterOverviewBaseName() [2/2]

void envitia::MapLinkProject::rasterOverviewBaseName ( const std::string & name)

Set the base name of generated raster overviews.

Parameters
nameBase name to use for generated raster overviews.

◆ rasterOverviewFixedResolution() [1/2]

double envitia::MapLinkProject::rasterOverviewFixedResolution ( )

Get the raster overview fixed resolution.

Returns
The configured resolution, or -1 if map properties are unavailable.

◆ rasterOverviewFixedResolution() [2/2]

void envitia::MapLinkProject::rasterOverviewFixedResolution ( double res)

Set the raster overview fixed resolution.

Parameters
resFixed resolution setting for raster overviews.

◆ rasterOverviewResolutionStep() [1/2]

double envitia::MapLinkProject::rasterOverviewResolutionStep ( )

Get the raster overview resolution step percentage.

Returns
The configured percentage, or -1 if map properties are unavailable.

◆ rasterOverviewResolutionStep() [2/2]

void envitia::MapLinkProject::rasterOverviewResolutionStep ( double stepPercent)

Set the raster overview resolution step as a percentage.

Parameters
stepPercentPercentage step between overview resolutions.

◆ recatalogueAllFilesInProject()

void envitia::MapLinkProject::recatalogueAllFilesInProject ( InformationTreeItem * parent)

Recatalogue the files beneath the specified project item.

Parameters
parentRoot item of the subtree to recatalogue.

◆ save()

bool envitia::MapLinkProject::save ( std::filesystem::path path)

Save the project to disk.

Parameters
pathDestination path for the project file.
Returns
Whether the project was saved.

◆ SelectAllLayersForMap()

bool envitia::MapLinkProject::SelectAllLayersForMap ( )

Select every layer for the next output map.

Returns
Whether selection succeeded.

◆ SelectLayersForMap()

bool envitia::MapLinkProject::SelectLayersForMap ( const std::vector< std::string > & layerNames,
const char * commandStr = 0 )

Select the named layers for the next output map.

Parameters
layerNamesNames of layers to include.
commandStrOptional selection command.
Returns
Whether the requested layers were selected.

◆ SetAllDatasetsInputClipping()

bool envitia::MapLinkProject::SetAllDatasetsInputClipping ( bounds_t bounds)

Set input clipping bounds for all datasets in the project.

Parameters
boundsClipping bounds in input coordinates.
Returns
Whether the bounds were applied to all datasets.

◆ setDatasetCoordinateSystem()

bool envitia::MapLinkProject::setDatasetCoordinateSystem ( InformationTreeItem * dataset,
const std::string & coordinateSystemName )

Set a dataset's coordinate system by name.

Parameters
datasetDataset whose coordinate system is changed.
coordinateSystemNameName of the coordinate system to set.
Returns
Whether the coordinate system was set for the dataset.

◆ SetDatasetInputClipping()

bool envitia::MapLinkProject::SetDatasetInputClipping ( InformationTreeItem * dataset,
bounds_t bounds )

Set a dataset's input clipping bounds.

Parameters
datasetDataset whose input is clipped.
boundsClipping bounds in input coordinates.
Returns
Whether the clipping bounds were applied.

◆ SetGeodeticClipping()

bool envitia::MapLinkProject::SetGeodeticClipping ( InformationTreeItem * layer,
interval_t latitude,
interval_t longitude )

Set a layer's latitude and longitude clipping intervals.

Parameters
layerLayer whose input is clipped.
latitudeLatitude interval.
longitudeLongitude interval.
Returns
Whether the clipping intervals were applied.

◆ setLayerTilingFixedNumber()

bool envitia::MapLinkProject::setLayerTilingFixedNumber ( InformationTreeItem * layer,
short numTilesAcross,
short numTilesDown )

Tile a layer using a fixed number of tiles across and down.

Parameters
layerLayer whose tiling is configured.
numTilesAcrossNumber of tiles horizontally.
numTilesDownNumber of tiles vertically.
Returns
Whether the tile counts were applied.

◆ setLayerTilingFixedSize()

bool envitia::MapLinkProject::setLayerTilingFixedSize ( InformationTreeItem * layer,
double tileWidth,
double tileHeight )

Tile a layer using a fixed tile size in output coordinate system units.

Parameters
layerLayer whose tiling is configured.
tileWidthWidth of each tile.
tileHeightHeight of each tile.
Returns
Whether the tile size was applied.

◆ setMapCoordinateSystem()

bool envitia::MapLinkProject::setMapCoordinateSystem ( const std::string & coordinateSystemName)

Set the map's coordinate system by name.

Parameters
coordinateSystemNameName of the coordinate system to set.
Returns
Whether the coordinate system was set.

◆ SetOutputClipping()

bool envitia::MapLinkProject::SetOutputClipping ( InformationTreeItem * layer,
bounds_t bounds )

Set a layer's output clipping bounds.

Parameters
layerLayer whose output is clipped.
boundsClipping bounds in output coordinates.
Returns
Whether the output clipping bounds were applied.