Holds global settings for MapWinGIS. Allows to retrieve GDAL errors. More...
Public Member Functions | |
string | LocalizedString (tkLocalizedStrings stringValue) |
Gets the localized version for a specified string used in the GUI. More... | |
void | LocalizedString (tkLocalizedStrings stringValue, string newValue) |
Sets the localized version for a specified string used in the GUI. More... | |
void | ResetGdalError () |
Clears information about last GDAL error. More... | |
void | SetHereMapsApiKey (string appId, string appCode) |
Sets application credentials for Here Maps online tiles. Without these credentials Here Maps providers are not available. More... | |
void | SetHttpUserAgent (string userAgent) |
Sets the user-agent string that will be used when requesting tiles. More... | |
bool | StartLogTileRequests (string filename, bool errorsOnly=false) |
Starts logging of tile requests. More... | |
void | StopLogTileRequests () |
Stops the logging of the tile requests to a logfile More... | |
bool | TestBingApiKey (string key) |
Requests URL address for tiles download from Bing Maps server. More... | |
Properties | |
bool | AllowLayersWithIncompleteReprojection [get, set] |
Allow layers with incomplete reprojection. More... | |
bool | AllowLayersWithoutProjections [get, set] |
Gets or sets a value indicating whether layers without metadata about coordinate system / projection can be added to the map. More... | |
bool | AllowProjectionMismatch [get, set] |
Gets or sets a value indicating whether layers with coordinate system / projection different from those of the map can be added to the map. More... | |
ICallback | ApplicationCallback [get, set] |
Gets or sets global callback object to report information about progress and errors taking place inside MapWinGIS. More... | |
bool | AutoChooseOgrLoadingMode [get, set] |
Gets or sets a value which indicates whether OgrLayer.DynamicLoading mode will be chosen automatically based on the number of features. More... | |
bool | AutoChooseRenderingHintForLabels [get, set] |
When set to true rendering hint for Labels will be chosen automatically to ensure better performance and visual quality. More... | |
string | BingApiKey [get, set] |
Gets or sets API key to access Bing maps. Without API key Bing Maps provider isn't available. More... | |
bool | CacheDbfRecords [get, set] |
Gets or sets a value indicating whether caching DBF records is enabled. More... | |
bool | CacheShapeRenderingData [get, set] |
Gets or sets a value indicating whether caching of rendering data for shapes is enabled. More... | |
tkCallbackVerbosity | CallbackVerbosity [get, set] |
Gets or sets the callback verbosity. More... | |
double | ClipperGcsMultiplicationFactor [get, set] |
Gets or sets a value which defines the multiplication coefficient for data in decimal degrees. More... | |
tkTiffCompression | CompressOverviews [get, set] |
Gets or sets the value indicating which compression mode will be used to compress image overviews. More... | |
PredefinedColorScheme | DefaultColorSchemeForGrids [get, set] |
Gets or sets color scheme to be used for rendering grids. More... | |
bool | ForceHideLabels [get, set] |
When set to true, any labels added to any instance of AxMap won't be rendered. More... | |
string | GdalDataPath [get, set] |
Gets or sets the path where data necessary for GDAL coordinate systems / projections will be searched for. More... | |
string | GdalLastErrorMsg [get] |
Extracts the last error message reported by GDAL library. More... | |
tkGdalError | GdalLastErrorNo [get] |
Gets a subtype of the last error reported by GDAL library. More... | |
tkGdalErrorType | GdalLastErrorType [get] |
Gets a type of the last error reported by GDAL library. More... | |
string | GdalPluginPath [get, set] |
Gets or sets the path where GDAL plug-ins will be searched for. More... | |
string | GdalReprojectionErrorMsg [get] |
Gets last error reported by GDAL reprojection routine. More... | |
string | GdalVersion [get] |
Gets the version of GDAL library which current build of MapWinGIS uses. More... | |
tkGeometryEngine | GeometryEngine [get, set] |
Gets or sets initial value to be set for Shapefile.GeometryEngine property of newly created shapefiles. More... | |
bool | GridFavorGreyscale [get, set] |
Gets or sets a value indicating whether greyscale or color scheme rendering will be used for grids by default. More... | |
tkGridProxyFormat | GridProxyFormat [get, set] |
Gets or sets format to be used for displaying grid datasources using image proxy. More... | |
tkGridProxyMode | GridProxyMode [get, set] |
Gets or sets preferred display mode for grid datasources. More... | |
bool | GridUseHistogram [get, set] |
Gets or sets a value indicating whether histogram will be computed and used for grid by default. More... | |
int | HotTrackingMaxShapeCount [get, set] |
Gets or sets maximum number of shapes within view for hot tracking functionality to work. More... | |
tkInterpolationMode | ImageDownsamplingMode [get, set] |
Gets or sets default value of Image.DownsamplingMode property. More... | |
tkInterpolationMode | ImageUpsamplingMode [get, set] |
Gets or sets default value of Image.UpsamplingMode property. More... | |
tkCollisionMode | LabelsCollisionMode [get, set] |
Sets collision mode for all instances of Labels class (which represent labels for either shapefiles or images). More... | |
tkCompositingQuality | LabelsCompositingQuality [get, set] |
Gets or sets GDI+ compositing quality for label drawing which will be used for all newly added layers. More... | |
tkSmoothingMode | LabelsSmoothingMode [get, set] |
Gets or sets GDI+ smoothing mode for label drawing which will be used for all newly added layers. More... | |
bool | LoadSymbologyOnAddLayer [get, set] |
Gets or sets a value indicating whether layer symbology from .mwsymb XML file should be automatically applied on adding layer to the map. More... | |
bool | LogTileErrorsOnly [get, set] |
Gets or sets a value indicating whether only errors will be logged to the for TMS/WMS requests. More... | |
double | MaxDirectGridSizeMb [get, set] |
Gets or sets maximum allowable size in MB for a grid datasource to be opened without proxy creation. More... | |
int | MaxReprojectionShapeCount [get, set] |
Gets or sets a value which limits the maximum number of shapes within a vector layer to run on-the-fly reprojection. More... | |
int | MaxUniqueValuesCountForGridScheme [get, set] |
Gets or sets the maximum allowable number of unique values in grid color scheme. More... | |
double | MinAreaToPerimeterRatio [get, set] |
Gets or sets a value which is used to weed out long narrow "splintered" polygons generated by geoprocessing routines. More... | |
int | MinOverviewWidth [get, set] |
Gets or sets the minimum width of image for GDAL overviews to be created. For images with smaller width no GDAL overviews will be created. More... | |
double | MinPolygonArea [get, set] |
Gets or sets the minimal area of polygon which will be passed to the output by geoprocessing routines. More... | |
double | MouseTolerance [get, set] |
Gets or sets a value which determines how close to a particular object mouse cursor should be in order to select it with mouse click. More... | |
bool | OgrInterpretYNStringAsBoolean [get, set] |
Gets or sets a value which indicates whether to interpret single-character Ogr strings as Logical/Boolean values, as long as the character contained in the string is one of valid DBF logical characters (e.g. Y, N, T, F). More... | |
bool | OgrLayerForceUpdateMode [get, set] |
When set to true the opening of any OGR layer will be first made with forUpdate parameter. If this first attempt fails, the layer will be opened without update flag. More... | |
int | OgrLayerMaxFeatureCount [get, set] |
Gets or sets the maximum number of features that can be loaded into memory for a single OGR layer. More... | |
bool | OgrShareConnection [get, set] |
Share connection between layers (may be unstable). For large read-only layers it will increase performance. More... | |
tkOgrEncoding | OgrStringEncoding [get, set] |
Gets or sets string encoding used to communicate with OGR drivers. More... | |
bool | OverrideLocalCallback [get, set] |
Gets or sets a value indicating whether instances of ICallback assigned to particular classes will be overriden by global callback assined to GlobalSettings.ApplicationCallback property. More... | |
tkPixelOffsetMode | PixelOffsetMode [get, set] |
Gets or sets pixel offset mode to be used during the rendering of vector layers. More... | |
string | ProjPath [get, set] |
Gets or sets the path where the PROJ resource files (proj.db) will be searched for (starting with PROJ 6). More... | |
bool | RandomColorSchemeForGrids [get, set] |
Gets or sets a value indicating whether color scheme set in GlobalsSettings.DefaultColorSchemeForGrids or a radom one should be used on opening grids. More... | |
tkRasterOverviewCreation | RasterOverviewCreation [get, set] |
Gets or sets a value indicating whether automatic creation of GDAL overviews will be performed for large datasets. More... | |
tkGDALResamplingMethod | RasterOverviewResampling [get, set] |
Gets or sets resampling method for creation of GDAL overviews. More... | |
bool | ReprojectLayersOnAdding [get, set] |
Gets or sets a value which determines whether automatic on-the-fly reprojection of the vector layer will be performed on adding a new layer to the map with different projection. More... | |
bool | SaveGridColorSchemeToFile [get, set] |
Gets or sets a value indicating whether color scheme for grid will be saved to .mwleg to be reused on the next opening. More... | |
bool | ShapefileFastMode [get, set] |
Gets or sets the value which indicates whether all the new instances of Shapefile class will be initialized with the fast mode turned on. More... | |
bool | ShapefileFastUnion [get, set] |
Gets or sets a value which affects the speed of Shapefile.Union operation. More... | |
tkShapeValidationMode | ShapeInputValidationMode [get, set] |
Sets validation mode for input of geoprocessing operations. More... | |
tkShapeValidationMode | ShapeOutputValidationMode [get, set] |
Sets validation mode for output of geoprocessing operations. More... | |
tkTiffCompression | TiffCompression [get, set] |
Gets or sets compression mode to be used for TIFF proxies created for grid rendering. More... | |
string | TileLogFilename [get] |
Gets the filename of the file to log TMS/WMS requests to. More... | |
bool | TileLogIsOpened [get] |
Gets a value indicating whether tile log is opened. More... | |
int | TilesMinZoomOnProjectionMismatch [get, set] |
Gets or sets minimum available zoom level for tiles when map projection and server projection don't match. More... | |
int | TilesThreadPoolSize [get, set] |
Gets or sets the number of threads to be used for downloading tiles from remote server. More... | |
bool | WmsDiskCaching [get, set] |
Gets or sets a value indicating whether WMS data will cached to the disk by default. More... | |
bool | ZoomToFirstLayer [get, set] |
Gets or sets a value indicating whether a map will zoom automatically to the first layer added with AxMap.AddLayer. More... | |
Holds global settings for MapWinGIS. Allows to retrieve GDAL errors.
All the properties of this class are defined as global variables and therefore changes in any instance of this class will affect all the instances of MapWinGIS control hosted by the application.
The major part of properties require advanced understanding of MapWinGIS functioning therefore it's not recommended to change them without a good reason.
Sometimes properties can be added to this class to provide a switch for testing new functions. Such properties may be removed afterwards (GlobalSettings.ShapefileFastUnion for example).
string GlobalSettings.LocalizedString | ( | tkLocalizedStrings | stringValue | ) |
Gets the localized version for a specified string used in the GUI.
stringValue | String to get localized version for. |
void GlobalSettings.LocalizedString | ( | tkLocalizedStrings | stringValue, |
string | newValue | ||
) |
Sets the localized version for a specified string used in the GUI.
stringValue | String to set localized version for. |
newValue | New localized value. |
void GlobalSettings.ResetGdalError | ( | ) |
Clears information about last GDAL error.
Affects GlobalSettings.GdalLastErrorMsg, GlobalSettings.GdalLastErrorNo, GlobalSettings.GdalLastErrorType, GlobalSettings.GdalReprojectionErrorMsg properties.
void GlobalSettings.SetHereMapsApiKey | ( | string | appId, |
string | appCode | ||
) |
Sets application credentials for Here Maps online tiles. Without these credentials Here Maps providers are not available.
appId | Application Id. Can be obtained by registering on the site of the service. |
appCode | Application code. Can be obtained by registering on the site of the service. |
void GlobalSettings.SetHttpUserAgent | ( | string | userAgent | ) |
Sets the user-agent string that will be used when requesting tiles.
Default value is
MapWinGIS/5.0
userAgent |
bool GlobalSettings.StartLogTileRequests | ( | string | filename, |
bool | errorsOnly = false |
||
) |
Starts logging of tile requests.
filename | The filename. |
errorsOnly | If set to true only errors will be logged. |
void GlobalSettings.StopLogTileRequests | ( | ) |
Stops the logging of the tile requests to a logfile
bool GlobalSettings.TestBingApiKey | ( | string | key | ) |
Requests URL address for tiles download from Bing Maps server.
key | API key to test. |
|
getset |
Allow layers with incomplete reprojection.
Default value is
false
|
getset |
Gets or sets a value indicating whether layers without metadata about coordinate system / projection can be added to the map.
The decision can also be made on per-layer bases by handling AxMap.LayerProjectionIsEmpty event.
Default value is
true
.
|
getset |
Gets or sets a value indicating whether layers with coordinate system / projection different from those of the map can be added to the map.
In most cases it's not advisable to allow projection mismatch, since relative position of layers with different projections won't be correct. The decision can also be made on per-layer bases by handling AxMap.ProjectionMismatch event.
Default value is
false
.
|
getset |
Gets or sets global callback object to report information about progress and errors taking place inside MapWinGIS.
The callback object set by this property will override all callback set for particular classes (like Shapefile.GlobalCallback, AxMap.GlobalCallback). Also it will automatically display internal GDAL error messages.
|
getset |
Gets or sets a value which indicates whether OgrLayer.DynamicLoading mode will be chosen automatically based on the number of features.
Default value is
true
|
getset |
When set to true rendering hint for Labels will be chosen automatically to ensure better performance and visual quality.
Default value is
true
.
|
getset |
Gets or sets API key to access Bing maps. Without API key Bing Maps provider isn't available.
|
getset |
Gets or sets a value indicating whether caching DBF records is enabled.
Default value is
true
.
|
getset |
Gets or sets a value indicating whether caching of rendering data for shapes is enabled.
Default value is
false
.
|
getset |
Gets or sets the callback verbosity.
Default value is
tkCallbackVerbosity.cvAll
|
getset |
Gets or sets a value which defines the multiplication coefficient for data in decimal degrees.
The default value is 10000.0.
The value is used for Clipper library due to the lack of built-in scaling in it.
|
getset |
Gets or sets the value indicating which compression mode will be used to compress image overviews.
The value is read from the GDAL option COMPRESS_OVERVIEW
Bug fixed in v5.4: MWGIS-309
Default value is
tkTiffCompression.tkmNONE
.
|
getset |
Gets or sets color scheme to be used for rendering grids.
The value will be used on passing Grid object to AxMap.AddLayer method.
Default value is PredefinedColorScheme.SummerMountains.
|
getset |
When set to true, any labels added to any instance of AxMap won't be rendered.
Default value is
false
.
|
getset |
Gets or sets the path where data necessary for GDAL coordinate systems / projections will be searched for.
This property effectively overrides GDAL_DATA environment variable. By default it's set to gdal-data folder in the directory where MapWinGIS is installed.
|
get |
Extracts the last error message reported by GDAL library.
|
get |
Gets a subtype of the last error reported by GDAL library.
The default value is tkGdalError.GdalErrorUndefined
|
get |
Gets a type of the last error reported by GDAL library.
The default value is tkGdalErrorType.GdalUndefined
|
getset |
Gets or sets the path where GDAL plug-ins will be searched for.
This property effectively overrides GDAL_DRIVER_PATH environment variable. By default it's set to gdalplugins folder in the directory where MapWinGIS is installed.
|
get |
Gets last error reported by GDAL reprojection routine.
Can be used to find out the source of failure of Shapefile.Reproject and Shapefile.ReprojectInPlace functions.
|
get |
Gets the version of GDAL library which current build of MapWinGIS uses.
|
getset |
Gets or sets initial value to be set for Shapefile.GeometryEngine property of newly created shapefiles.
Default value is tkGeometryEngine.engineGeos
|
getset |
Gets or sets a value indicating whether greyscale or color scheme rendering will be used for grids by default.
Default value is
true
.
|
getset |
Gets or sets format to be used for displaying grid datasources using image proxy.
Methods like Grid.HasImageProxy or Grid.RemoveImageProxy will only take into account the format chosen in this property.
The default value is tkGridProxyFormat.gpfBmpProxy
|
getset |
Gets or sets preferred display mode for grid datasources.
This property will be used in AxMap.AddLayer and Grid.OpenAsImage methods if Grid.PreferedDisplayMode is set to tkGridProxyMode.gpmAuto.
The default value is tkGridProxyMode.gpmAuto
|
getset |
Gets or sets a value indicating whether histogram will be computed and used for grid by default.
Default value is
true
.
|
getset |
Gets or sets maximum number of shapes within view for hot tracking functionality to work.
Hot tracking is used by tkCursorMode.cmIdentify tool and interactive editing tools.
Default value is
200
|
getset |
Gets or sets default value of Image.DownsamplingMode property.
Quality of the image vs performance
Default value is tkInterpolationMode.imBilinear.
|
getset |
Gets or sets default value of Image.UpsamplingMode property.
Quality of the image vs performance
Default value is tkInterpolationMode.imNone.
|
getset |
Sets collision mode for all instances of Labels class (which represent labels for either shapefiles or images).
The default value is tkCollisionMode.LocalList
|
getset |
Gets or sets GDI+ compositing quality for label drawing which will be used for all newly added layers.
The default value is tkCompositingQuality.HighQuality.
|
getset |
Gets or sets GDI+ smoothing mode for label drawing which will be used for all newly added layers.
The default value is tkSmoothingMode.HighQualityMode.
|
getset |
Gets or sets a value indicating whether layer symbology from .mwsymb XML file should be automatically applied on adding layer to the map.
Default value is
true
.
|
getset |
Gets or sets a value indicating whether only errors will be logged to the for TMS/WMS requests.
Default value is
true
.
|
getset |
Gets or sets maximum allowable size in MB for a grid datasource to be opened without proxy creation.
For grids with size exceeding the value of this property, proxy image will be created when GridProxyMode is set to tkGridProxyMode.gpmAuto. For tkGridProxyMode.gpmNoProxy Grid.CanDisplayWithoutProxy will return false
and Grid.OpenAsImage will fail. Grids of smaller size will be rendered directly for all the modes but tkGridProxyMode.gpmUseProxy if datasources format allows it (see Grid.CanDisplayWithoutProxy).
Direct rendering of grid datasources is computationally expensive process therefore for large datasources rendering may become too slow.
Default value is 20.0 MB. Zero or negative values set no limitation.
|
getset |
Gets or sets a value which limits the maximum number of shapes within a vector layer to run on-the-fly reprojection.
This property is taken into account when projection mismatch occurs on adding a new layer to the map.
Default value is
50
000.
|
getset |
Gets or sets the maximum allowable number of unique values in grid color scheme.
Affects Grid.GeneratedColorScheme when generation method is set to tkGridSchemeGeneration.gsgUniqueValues or tkGridSchemeGeneration.gsgUniqueValuesOrGradient.
Default value is 100
|
getset |
Gets or sets a value which is used to weed out long narrow "splintered" polygons generated by geoprocessing routines.
Polygons with area to perimeter ratio less than this values won't be passed to the output.
The default value is 0.0001.
|
getset |
Gets or sets the minimum width of image for GDAL overviews to be created. For images with smaller width no GDAL overviews will be created.
Default value is
512
|
getset |
Gets or sets the minimal area of polygon which will be passed to the output by geoprocessing routines.
When the data is defined in decimal degrees, this value will be divided into squared conversion factor between decimal degrees and meters (roughly 110000 per degree).
The default value is 1.0.
|
getset |
Gets or sets a value which determines how close to a particular object mouse cursor should be in order to select it with mouse click.
Default value is
20
map units.
|
getset |
Gets or sets a value which indicates whether to interpret single-character Ogr strings as Logical/Boolean values, as long as the character contained in the string is one of valid DBF logical characters (e.g. Y, N, T, F).
Applies to conversion of OGR Shapefile layers to MapWinGIS Shapefiles (via GetBuffer), since OGR Shapefiles do not support Logical fields. Instead, DBF Logical fields are read as single- character strings.
Default value is
true
.
|
getset |
When set to true the opening of any OGR layer will be first made with forUpdate parameter. If this first attempt fails, the layer will be opened without update flag.
Default value is
false
.
|
getset |
Gets or sets the maximum number of features that can be loaded into memory for a single OGR layer.
Default value is
50
000
|
getset |
Share connection between layers (may be unstable). For large read-only layers it will increase performance.
Default value is
false
|
getset |
Gets or sets string encoding used to communicate with OGR drivers.
Default value is tkOgrEncoding.oseUtf8.
|
getset |
Gets or sets a value indicating whether instances of ICallback assigned to particular classes will be overriden by global callback assined to GlobalSettings.ApplicationCallback property.
Default value is
true
.
|
getset |
Gets or sets pixel offset mode to be used during the rendering of vector layers.
Default value is
tkPixelOffsetMode.pomDefault
.
|
getset |
Gets or sets the path where the PROJ resource files (proj.db) will be searched for (starting with PROJ 6).
This property effectively overrides PROJ_LIB environment variable. By default it's set to proj7\share folder in the directory where MapWinGIS is installed.
|
getset |
Gets or sets a value indicating whether color scheme set in GlobalsSettings.DefaultColorSchemeForGrids or a radom one should be used on opening grids.
The value will be used on passing Grid object to AxMap.AddLayer method.
Defautl value is
true
.
|
getset |
Gets or sets a value indicating whether automatic creation of GDAL overviews will be performed for large datasets.
Currently applied to grid datasets only (both direct and proxy rendering). No automatic overview creation for RGB image is implemented so far.
Default value is tkRasterOverviewCreation.rocAuto.
|
getset |
Gets or sets resampling method for creation of GDAL overviews.
Default value is tkGDALResamplingMethod.grmNearest.
|
getset |
Gets or sets a value which determines whether automatic on-the-fly reprojection of the vector layer will be performed on adding a new layer to the map with different projection.
The decision can also be made on per-layer bases by handling AxMap.ProjectionMismatch event.
Default value is
false
.
|
getset |
Gets or sets a value indicating whether color scheme for grid will be saved to .mwleg to be reused on the next opening.
This value affects only grid datasources rendered by Image class directly. Color scheme for proxy images will be written on disk despite this values. Without them those proxies become meaningless.
Default value is
true
.
|
getset |
Gets or sets the value which indicates whether all the new instances of Shapefile class will be initialized with the fast mode turned on.
The default value is
false
.
|
getset |
Gets or sets a value which affects the speed of Shapefile.Union operation.
The default value is
true
.
|
getset |
Sets validation mode for input of geoprocessing operations.
This setting affects only Shapefile objects, while it doesn't affect single shapes passed as parameters. Check results of validation in Shapefile.LastInputValidation.
Default value is tkShapeValidationMode.NoValidation.
|
getset |
Sets validation mode for output of geoprocessing operations.
This setting affects only methods where Shapefile objects are returned as output, single shapes returned as output are not affected. Check results of validation in Shapefile.LastOutputValidation.
Default value is tkShapeValidationMode.NoValidation.
|
getset |
Gets or sets compression mode to be used for TIFF proxies created for grid rendering.
Default value: tkTiffCompression.tkmLZW.
|
get |
Gets the filename of the file to log TMS/WMS requests to.
|
get |
Gets a value indicating whether tile log is opened.
|
getset |
Gets or sets minimum available zoom level for tiles when map projection and server projection don't match.
This value will be used for any provider which uses Spherical Mercator projection while map projection isn't set to Spherical Mercator or WGS84.
Smaller zoom levels (1-5) typically have severe distortions caused by coordinate transformation which makes them unusable. Tiles won't be displayed at all for these levels and they will not be included into the zoom bar.
Default value is
6
.
|
getset |
Gets or sets the number of threads to be used for downloading tiles from remote server.
Increasing the number of threads doesn't necessarily lead to better performance as servers may limit the number of simultaneous connections from the same IP address.
Default value is 5.
|
getset |
Gets or sets a value indicating whether WMS data will cached to the disk by default.
Default value is
true
.
|
getset |
Gets or sets a value indicating whether a map will zoom automatically to the first layer added with AxMap.AddLayer.
Default value is
true