diff --git a/.gitignore b/.gitignore
index 67da0f8d..d0eae807 100644
--- a/.gitignore
+++ b/.gitignore
@@ -168,3 +168,15 @@ docs/output
demo/.nuget/
*.zip
unittests/MapWinGISTests/AkkerwebTests.cs
+*.exe
+*.mwd
+*.mwx
+unittests/packages/
+unittests/.vs/unittests/v15/Server/sqlite3/storage.ide
+unittests/.vs/unittests/v15/Server/sqlite3/db.lock
+docs/.vs/MapWinGis Documentation/v15/Server/sqlite3/storage.ide-wal
+docs/.vs/MapWinGis Documentation/v15/Server/sqlite3/storage.ide-shm
+docs/.vs/MapWinGis Documentation/v15/Server/sqlite3/storage.ide
+docs/.vs/MapWinGis Documentation/v15/Server/sqlite3/db.lock
+src/MapWinGIS.vcxproj.filters
+unittests/.vs/
diff --git a/demo/MWLite.Core/GeoLocation/GeoLocationHelper.cs b/demo/MWLite.Core/GeoLocation/GeoLocationHelper.cs
index 29449001..8d288e47 100644
--- a/demo/MWLite.Core/GeoLocation/GeoLocationHelper.cs
+++ b/demo/MWLite.Core/GeoLocation/GeoLocationHelper.cs
@@ -27,7 +27,7 @@ public static Extents FindLocation(string query)
private static string ResquestLocation(string query)
{
//var url = "https://maps.googleapis.com/maps/api/geocode/json?address=" + query;
- var url = string.Format("http://nominatim.openstreetmap.org/search/{0}?format=json&limit=1", query);
+ var url = string.Format("https://nominatim.openstreetmap.org/search/{0}?format=json&limit=1", query);
var request = (HttpWebRequest)WebRequest.Create(url);
request.Referer = "mapwingis.codeplex.com";
diff --git a/docs/AxInterop.MapWinGIS.XML b/docs/AxInterop.MapWinGIS.XML
index ab867e79..b4bd2478 100644
--- a/docs/AxInterop.MapWinGIS.XML
+++ b/docs/AxInterop.MapWinGIS.XML
@@ -9,7 +9,8 @@
Map component for visualization of vector, raster or grid data.
Here is a class diagram for the AxMap class:
- \dot digraph map_diagram {
+ \dot
+ digraph map_diagram {
nodesep = 0.3;
ranksep = 0.3;
splines = ortho;
@@ -45,6 +46,30 @@
\dotfile mapgroups.dot
Graph description
+
+
+ Gets or sets the user defined cursor handle. The handle is a windows cursor handle.
+
+
+
+
+ Gets or sets the object of Tiles class associated with map.
+
+ \new490 Added in version 4.9.0
+
+
+
+ Gets FileManager object associated with map. The object is used by AxMap.AddLayerFromFilename methods.
+
+ \new491 Added in version 4.9.1
+
+
+
+ Gets or sets the background color of the map.
+
+ When using VB.NET the color is represented as a System.Drawing.Color.
+ When using VB 6 the color can be an OLE_COLOR or an integer representation of an RGB value.
+
Draws the content of the back buffer to specified device context.
@@ -54,12 +79,42 @@
The width of the resulting image.
The height of the resulting image.
+
+
+ The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
+
+ .NET clients passing ICallback implementation to this property must make respective
+ class COM visible by setting ComVisible(true) attribute. In fact ComVisible(true) is set by default
+ for public classes, so it's enough to make sure that it isn't explicitly set to false for the class
+ or assembly where the class is defined. Otherwise InvalidCastException may occur at runtime.
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+
Returns the handle of the window of map control.
The handle of window.
+
+
+ The key may be used by the programmer to store any string data associated with the object.
+
+
+
+
+ Retrieves the last error generated in the object.
+
+
+
+
+ Gets or sets the cursor used with the map. When using crsrUserDefined be sure to set a UDCursorHandle.
+
+
+
+
+ Gets or sets the value which indicates how the control adjust its content after the resizing operations.
+
+
Redraws all layers in the map if the map is not locked.
@@ -73,6 +128,13 @@
The new width of the control.
The new hight of the control.
+
+
+ Gets or sets a value which indicates whether the time of map redraw will be displayed on the screen.
+
+ Only times of full redraws when data layers are drawn anew are displayed.
+ \new48 Added in version 4.8
+
Shows tooltip near the mouse cursor.
@@ -80,6 +142,12 @@
Text of the tooltip.
The duration of tooltip display.
+
+
+ Gets or sets a boolean value which indicate whether control's version number will be displayed on the screen.
+
+ \new48 Added in version 4.8
+
Takes snap shot of the contents of the map within the bounds of the specified rectangle, returning an image of the results.
@@ -117,6 +185,12 @@
The width of the resulting image inShowVersionNumber pixels.
True on success and false otherwise.
+
+
+ Gets or sets version number of the control.
+
+ The set part of the property isn't supported.
+
Retrieves the error message associated with the specified error code.
@@ -124,6 +198,14 @@
The error code for which the error message is required.
The error message description for the specified error code.
+
+
+ Gets or sets tile provider for the map.
+
+ This property is a shortcut for AxMap.Tiles.Provider property.
+ Setting it to ProviderNone will change AxMap.Tiles.Visible property to false.
+ \new491 Added in version 4.9.1
+
Returns coordinate of the shapefile point closest to specified point on screen.
@@ -166,6 +248,59 @@
altogether and call AxMap.Redraw instead ( equivalent to AxMap.Redraw2(tkRedrawType.RedrawAll)).
\new491 Added in version 4.9.1
+
+
+ Gets list actions performed by user via interactive shape editor. Provides undo/redo capability.
+
+ \new493 Added in version 4.9.3
+
+
+
+ Gets an %Identifier object which holds settings of cmIdentify tools.
+
+ \new493 Added in version 4.9.3
+
+
+
+ Gets instance of shape editor class associated with map which stores data entered by interactive editing tools.
+
+ \new493 Added in version 4.9.3
+
+
+ \addtogroup map_interaction Map interaction
+ Here is a list of properties and methods which affect the way a user interacts with the map. This module is a part of the documentation of AxMap class.
+ \dot
+ digraph map_interaction {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Map Interaction" URL="\ref map_interaction"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
+
+ Gets or sets a boolean value which indicate whether map will be redrawn in the course of panning operation.
+
+ The default value is false. Setting this value to true can improve the user experience but
+ decrease the performance in case large layers are displayed.
+ \new48 Added in version 4.8
+
+
+
+ Gets or sets the cursor mode for the map.
+
+ The cursor mode determines how the map handles mouse click events on the map. The only mode not handled by the map is cmNone.
+
+
+
+ Gets or sets zoom behaviour for the map control.
+
+ \new491 Added in version 4.9.1
+
Zoomes map to display selected shapes of the specified shapefile.
@@ -191,6 +326,11 @@
True on success.
\new490 Added in version 4.9.0
+
+
+ Checks to see if the map is currently locked or not.
+
+
Locks the window so that any changes will not be displayed until it is unlocked.
@@ -199,6 +339,53 @@
The changes of drawing options in the related classes (Shapefile, Labels, etc.) won't cause the redraw of the map even if it's not locked.
The state of the lock mode.
+
+
+ Gets or sets a boolean value which indicates whether a wait cursor will be displayed on map redraw.
+
+
+
+
+ Gets or sets the speed of zooming with mouse wheel.
+
+ The default values is 0.5. The values in 0.1 - 10.0 range are accepted. The value 1.0 will turn off
+ the zooming by mouse wheel.
+
+
+
+ Gets or sets whether the map sends mouse down events.
+
+
+
+
+ Gets or sets whether the map sends mouse move events.
+
+
+
+
+ Gets or sets whether the map sends mouse up events.
+
+
+
+
+ Gets or sets a boolean value which indicates whether the map sends on draw back buffer events.
+
+
+
+
+ Gets or sets whether the map sends the SelectBoxDrag event.
+
+
+
+
+ Gets or sets whether the map sends the SelectBoxFinal event.
+
+
+
+
+ Gets or sets a boolean value which can affect the displaying of the context menus in client code by the right click.
+
+
Zooms the display in by the given factor.
@@ -211,6 +398,11 @@
The factor to zoom out by.
+
+
+ Gets or sets the factor by which to zoom the view of the map in or out.
+
+
Zooms the map display to the specified layer.
@@ -242,6 +434,87 @@
The handle of the layer containing the shape to zoom to.
The index of the shape to zoom to.
+
+
+ Gets or sets a value indicating whether zoom bar will be displayed on the map.
+
+ Zoom bar can be displayed only if projection of the map is set. Zoom levels
+ depend upon tile of the current tile provider.
+ /see AxMap.TileProvider, AxMap.Projection
+ \new492 Added in version 4.9.2
+
+
+
+ Gets or sets a value indicating whether animation will be displayed zooming map in or out.
+
+ Default csAuto value will display animation only if there are no data layers
+ within visisble extents. Animation also won't be displayed if there are more than 4
+ zoom levels between current and target level.
+ \new492 Added in version 4.9.2
+
+
+
+ Gets or sets a value indicating whether animation will be displayed to simulate
+ inertia after panning operation.
+
+ Default csAuto value will display animation only if there are no data layers
+ within visisble extents.
+ \note Mouse panning is somewhat more tricky than the one with smartphone's touch screen,
+ so some practice may be needed to learn not to stop mouse motion before releasing the button )))
+
+ \new492 Added in version 4.9.2
+
+
+
+ Gets or sets a value indicating whether currently rendered tile buffer should be scaled
+ and reused during the next redraw.
+
+ \new492 Added in version 4.9.2
+
+
+
+ Gets or sets a value indicating whether the legacy 'hand' cursor should be used
+ for map panning rather than the standard 'NSEW' four-point cursor.
+
+ \new495 Added in version 4.9.5
+
+
+
+ Gets or sets the amount of information to be displayed in zoom bar tool tip.
+
+ \new492 Added in version 4.9.2
+
+
+
+ Gets or sets a style of zoom box, which is used to select a region with Zoom In tool.
+
+ \new492 Added in version 4.9.2
+
+
+
+ Gets or sets minimum zoom level to be used by zoom bar.
+
+ This property won't increase the number of available levels,
+ if certain levels aren't supported by the provider they still won't be displayed.
+ \new492 Added in version 4.9.2
+
+
+
+ Gets or sets maximum zoom level to be used by zoom bar.
+
+ This property won't increase the number of available levels,
+ if certain levels aren't supported by the provider they still won't be displayed.
+ \new492 Added in version 4.9.2
+
+
+
+ Gets or sets a value indicating whether to move the mouse click point to the center of the map
+ when using the Zoom In or Zoom Out tools.
+
+ The default value is False, indicating that the map is not recentered,
+ but instead keeps the click point at the mouse position and zooms around that point.
+ \new495 Added in version 4.9.5
+
Reverts the last operation performed by user in interactive shape editor.
@@ -251,6 +524,21 @@
\new493 Added in version 4.9.3
+ \addtogroup map_serialization Map serialization
+ Here is a list of properties and methods to preserve the state of the map and particular layers. This module is a part of the documentation of AxMap class.
+ \dot
+ digraph map_serialization {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Map Serialization" URL="\ref map_serialization"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
Serializes the layer settings to the string.
@@ -348,6 +636,21 @@
\new48 Added in version 4.8
+ \addtogroup map_layer_properties Layer properties
+ Here is a list of properties common to all data layers. This module is a part of the documentation of AxMap class.
+ \dot
+ digraph map_layer_properties {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Layer Properties" URL="\ref map_layer_properties"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
Gets maximum zoom at which the layer will be displayed.
@@ -549,6 +852,21 @@
The color scheme for the specified layer
+ \addtogroup map_layer_management Layer management
+ Here is a list of properties and methods which allow to work with layers of the map. This module is a part of the documentation of AxMap class.
+ \dot
+ digraph map_layer {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Layer Management" URL="\ref map_layer_management"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
Removes all data from the map and sets its properties to the default state.
@@ -628,6 +946,11 @@
The initial position of the layer to be moved.
Boolean value representing success when true, failure when false.
+
+
+ Gets the number of layers loaded in the map.
+
+
Removes all layers from the map.
@@ -718,6 +1041,21 @@
\new493 Added in version 4.9.3
+ \addtogroup map_drawing_layers Drawing layers
+ Here is a list of methods and properties to interact with the drawing layers of the map. This module is a part of the documentation of AxMap class.
+ \dot
+ digraph map_drawing_layers {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Drawing Layers" URL="\ref map_drawing_layers"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
Replaces the labels associated with the drawing layer.
@@ -947,6 +1285,23 @@
\new493 Added in version 4.9.3
+ \addtogroup map_shapefile Shapefile visualization
+ Here is a list of properties for changing appearance of shapefile layer added to the map.
+ Consider the usage of ShapeDrawingOptions class to access wider set of options.
+ See Shapefile.DefaultDrawingOptions for details. This module is a part of the documentation of AxMap class.
+ \dot
+ digraph map_shapefile {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Shapefile visualization" URL="\ref map_shapefile"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
Gets whether the specified layer is drawn with a fill. Only works on polygon shapefiles.
@@ -1124,391 +1479,65 @@
The handle of the shapefile layer.
The color of stipple.
-
-
+
- Gets a boolean value which indicates whether the background of fill stipple for polygon shapefile layer will be transparent.
+ Sets the color of the polygon stipple for shapefile layer.
This property corresponds to the ShapeDrawingOptions.FillBgTransparent property.
+ This property corresponds to the ShapeDrawingOptions.FillHatchStyle property.
The handle of the shapefile layer.
- True in case the background is transparent and false otherwise.
+ The color of stipple.
+ \see Shapefile.DefaultDrawingOptions
-
+
- Sets a boolean value which indicates whether the background of fill stipple for polygon shapefile layer will be transparent.
+ Gets a boolean value which indicates whether the background of fill stipple for polygon shapefile layer will be transparent.
This property corresponds to the ShapeDrawingOptions.FillBgTransparent property.
The handle of the shapefile layer.
- True in case the background is transparent and false otherwise.
-
-
-
- Sets geographic extents for the map.
-
- Longitude of center of the screen (degrees).
- Latitude of center of the screen (degrees).
- Width of displayed extents in kilometres.
- Projection for the must be specified in order for this method to work.
- True on success.
- \new491 Added in version 4.9.1
-
-
-
- Gets known extents.
-
- Known extents to retrieve.
- Extents object.
- \new491 Added in version 4.9.1
-
-
-
- Sets geographic extents in decimal degrees for the map.
-
- Geographic extents in decimal degrees.
- True on success.
- For operation to succeed, projection must be set for the map (see AxMap.GeoProjection property)
- \new490 Added in version 4.9.0
-
-
-
- Converts pixel coordinates to projected map coordinates
-
- The x pixel coordinate to be converted into the projected x map coordinate.
- The y pixel coordinate to be converted into the projected y map coordinate
- The projected x map coordinate is returned through this reference parameter.
- The projected y map coordinate is returned through this reference parameter.
-
-
-
- Converts projected map coordinates into screen pixel units
-
- The projected x map coordinate to be converted into the x pixel coordinate.
- The projected y map coordinate to be converted into the y pixel coordinate.
- The pixel x coordinate is returned through this reference parameter
- The pixel y coordinate is returned through this reference parameter.
-
-
-
- Converts projected map coordinates to decimal degrees (map projection must be specified for this method to work).
-
- Projected X map coordinate.
- Projected Y map coordinate.
- Converted longitude in decimal degrees
- Converted latitude in decimal degrees
- True on success.
- \new491 Added in version 4.9.1
-
-
-
- Converts coordinates in decimal degrees to pixel coordinates (map projection must be specified for this method to work).
-
- X screen coordinate.
- Y screen coordinate.
- Converted longitude in decimal degrees
- Converted latitude in decimal degrees
- True on success.
- \new491 Added in version 4.9.1
-
-
-
- Converts coordinates in decimal degrees to projected map coordinates (map projection must be specified for this method to work).
-
- Longitude in decimal degrees.
- Latitude in decimal degrees.
- Resulting projected X map coordinate.
- Resulting Projected Y map coordinate.
- True on success.
- \new491 Added in version 4.9.1
-
-
-
- Converts pixel coordinates to decimal degrees (map projection must be specified for this method to work).
-
- Longitude in decimal degrees.
- Latitude in decimal degrees.
- Converted X screen coordinate.
- Converted Y screen coordinate.
- True on success.
- \new491 Added in version 4.9.1
-
-
-
- Calculates area of polygon taking into account the shape of Earth.
-
- For the time being only single-part polygons are accepted as input. Calculation are made using
- GeographicLib.
- Single part polygon shape defined in coordinates of map.
- Area of shape in square meters or 0.0 if current map projection doesn't support transformation to WGS84.
- \new493 Added in version 4.9.3
-
-
-
- Calculates geodesic distance between 2 points defined in map coordinate system.
-
- To calculate geodesic distance between 2 points in screen coordinates use AxMap.PixelToProj first.
- Calculation are made using GeographicLib.
- X coordinate of the first point.
- Y coordinate of the first point.
- X coordinate of the second point.
- Y coordinate of the second point.
- Distance between 2 points in meters 0.0 if current map projection doesn't support transformation to WGS84
- \new493 Added in version 4.9.3
-
-
-
- Calculates length of polyline or perimeter of polygon taking into account the shape of Earth.
-
- For the time being only single-part shapes are accepted as input. Calculation are made using
- GeographicLib.
- Single part polygon or polyline shape defined in coordinates of map.
- Length of polyline or perimeter of polygon in meters or 0.0 if current map projection doesn't support transformation to WGS84.
- \new493 Added in version 4.9.3
-
-
-
- Gets or sets the user defined cursor handle. The handle is a windows cursor handle.
-
-
-
-
- Gets or sets the object of Tiles class associated with map.
-
- \new490 Added in version 4.9.0
-
-
-
- Gets FileManager object associated with map. The object is used by AxMap.AddLayerFromFilename methods.
-
- \new491 Added in version 4.9.1
-
-
-
- Gets or sets the background color of the map.
-
- When using VB.NET the color is represented as a System.Drawing.Color.
- When using VB 6 the color can be an OLE_COLOR or an integer representation of an RGB value.
-
-
-
- The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
-
- .NET clients passing ICallback implementation to this property must make respective
- class COM visible by setting ComVisible(true) attribute. In fact ComVisible(true) is set by default
- for public classes, so it's enough to make sure that it isn't explicitly set to false for the class
- or assembly where the class is defined. Otherwise InvalidCastException may occur at runtime.
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
-
-
- The key may be used by the programmer to store any string data associated with the object.
-
-
-
-
- Retrieves the last error generated in the object.
-
-
-
-
- Gets or sets the cursor used with the map. When using crsrUserDefined be sure to set a UDCursorHandle.
-
-
-
-
- Gets or sets the value which indicates how the control adjust its content after the resizing operations.
-
-
-
-
- Gets or sets a value which indicates whether the time of map redraw will be displayed on the screen.
-
- Only times of full redraws when data layers are drawn anew are displayed.
- \new48 Added in version 4.8
-
-
-
- Gets or sets a boolean value which indicate whether control's version number will be displayed on the screen.
-
- \new48 Added in version 4.8
-
-
-
- Gets or sets version number of the control.
-
- The set part of the property isn't supported.
-
-
-
- Gets or sets tile provider for the map.
-
- This property is a shortcut for AxMap.Tiles.Provider property.
- Setting it to ProviderNone will change AxMap.Tiles.Visible property to false.
- \new491 Added in version 4.9.1
-
-
-
- Gets list actions performed by user via interactive shape editor. Provides undo/redo capability.
-
- \new493 Added in version 4.9.3
-
-
-
- Gets an %Identifier object which holds settings of cmIdentify tools.
-
- \new493 Added in version 4.9.3
-
-
-
- Gets instance of shape editor class associated with map which stores data entered by interactive editing tools.
-
- \new493 Added in version 4.9.3
-
-
-
- Gets or sets a boolean value which indicate whether map will be redrawn in the course of panning operation.
-
- The default value is false. Setting this value to true can improve the user experience but
- decrease the performance in case large layers are displayed.
- \new48 Added in version 4.8
-
-
-
- Gets or sets the cursor mode for the map.
-
- The cursor mode determines how the map handles mouse click events on the map. The only mode not handled by the map is cmNone.
-
-
-
- Gets or sets zoom behaviour for the map control.
-
- \new491 Added in version 4.9.1
-
-
-
- Checks to see if the map is currently locked or not.
-
-
-
-
- Gets or sets a boolean value which indicates whether a wait cursor will be displayed on map redraw.
-
-
-
-
- Gets or sets the speed of zooming with mouse wheel.
-
- The default values is 0.5. The values in 0.1 - 10.0 range are accepted. The value 1.0 will turn off
- the zooming by mouse wheel.
-
-
-
- Gets or sets whether the map sends mouse down events.
-
-
-
-
- Gets or sets whether the map sends mouse move events.
-
-
-
-
- Gets or sets whether the map sends mouse up events.
-
-
-
-
- Gets or sets a boolean value which indicates whether the map sends on draw back buffer events.
-
-
-
-
- Gets or sets whether the map sends the SelectBoxDrag event.
-
-
-
-
- Gets or sets whether the map sends the SelectBoxFinal event.
-
-
-
-
- Gets or sets a boolean value which can affect the displaying of the context menus in client code by the right click.
-
-
-
-
- Gets or sets the factor by which to zoom the view of the map in or out.
-
-
-
-
- Gets or sets a value indicating whether zoom bar will be displayed on the map.
-
- Zoom bar can be displayed only if projection of the map is set. Zoom levels
- depend upon tile of the current tile provider.
- /see AxMap.TileProvider, AxMap.Projection
- \new492 Added in version 4.9.2
-
-
-
- Gets or sets a value indicating whether animation will be displayed zooming map in or out.
-
- Default csAuto value will display animation only if there are no data layers
- within visisble extents. Animation also won't be displayed if there are more than 4
- zoom levels between current and target level.
- \new492 Added in version 4.9.2
-
-
-
- Gets or sets a value indicating whether animation will be displayed to simulate
- inertia after panning operation.
-
- Default csAuto value will display animation only if there are no data layers
- within visisble extents.
- \note Mouse panning is somewhat more tricky than the one with smartphone's touch screen,
- so some practice may be needed to learn not to stop mouse motion before releasing the button )))
-
- \new492 Added in version 4.9.2
-
-
-
- Gets or sets a value indicating whether currently rendered tile buffer should be scaled
- and reused during the next redraw.
-
- \new492 Added in version 4.9.2
-
-
-
- Gets or sets the amount of information to be displayed in zoom bar tool tip.
-
- \new492 Added in version 4.9.2
-
-
-
- Gets or sets a style of zoom box, which is used to select a region with Zoom In tool.
-
- \new492 Added in version 4.9.2
+ True in case the background is transparent and false otherwise.
-
+
- Gets or sets minimum zoom level to be used by zoom bar.
+ Sets a boolean value which indicates whether the background of fill stipple for polygon shapefile layer will be transparent.
- This property won't increase the number of available levels,
- if certain levels aren't supported by the provider they still won't be displayed.
- \new492 Added in version 4.9.2
+ This property corresponds to the ShapeDrawingOptions.FillBgTransparent property.
+ The handle of the shapefile layer.
+ True in case the background is transparent and false otherwise.
-
+
+ \addtogroup map_extents Max extents and zoom
+ Here is list of properties and methods that affect map extents and zoom level. This module is a part of the documentation of AxMap class.
+ \dot
+ digraph map_extents {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Map extents adn zoom" URL="\ref map_extents"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
- Gets or sets maximum zoom level to be used by zoom bar.
+ Sets geographic extents for the map.
- This property won't increase the number of available levels,
- if certain levels aren't supported by the provider they still won't be displayed.
- \new492 Added in version 4.9.2
+ Longitude of center of the screen (degrees).
+ Latitude of center of the screen (degrees).
+ Width of displayed extents in kilometres.
+ Projection for the must be specified in order for this method to work.
+ True on success.
+ \new491 Added in version 4.9.1
-
+
- Gets the number of layers loaded in the map.
+ Gets known extents.
+ Known extents to retrieve.
+ Extents object.
+ \new491 Added in version 4.9.1
@@ -1518,6 +1547,15 @@
Otherwise null will be returned.
\new490 Added in version 4.9.0
+
+
+ Sets geographic extents in decimal degrees for the map.
+
+ Geographic extents in decimal degrees.
+ True on success.
+ For operation to succeed, projection must be set for the map (see AxMap.GeoProjection property)
+ \new490 Added in version 4.9.0
+
Gets or sets latitude of the center of screen (in decimal degrees).
@@ -1573,6 +1611,7 @@
Gets or sets the extents of the map using an Extents object.
If the given extents do not fit the aspect ratio of the map, the map will fit the given extents as well as possible.
+ \new495 Return value changed to IExtents in version 4.9.5
@@ -1580,6 +1619,145 @@
+ \addtogroup map_coordinates Map projection and coordinates
+ Here is list of properties and methods which are related to coordinate system, projection of map and units conversion.
+ This module is a part of the documentation of AxMap class.
+ \dot
+ digraph map_projection {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Max projection and coordianates" URL="\ref map_coordinates"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description\n\n
+ \anchor a_projection
+ \section proj1 A. Setting projection for the map.
+
+ No matter what type of GIS application you are going to write, the decision about map coordinate system and projection is one of the first to be made.
+ MapWinGIS provides the following options.
+
+ \dot
+ digraph projection_options {
+ splines = true;
+ ranksep = 0.15;
+ nodesep = 0.5;
+ node [shape = oval, peripheries = 1, fontname=Helvetica, fontsize=9, fillcolor = gray, color = "gray", style = filled, height = 0.3, width = 0.8];
+ render [ label="Choosing map projection"];
+
+ node [shape = "note", width = 0.3, height = 0.3, peripheries = 1 fillcolor = "khaki" ]
+ s1 [label=" Set projection manullay\l"];
+ s2 [label=" Grab projection from data\l"];
+ s3 [label=" Don't use projection at all\l"];
+
+ edge [dir = none, arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#808080" minlen=2 ]
+ render -> s1;
+ render -> s2;
+ render -> s3;
+ }
+ \enddot
+ Let's consider each of the approaches.
+
+ 1. Settings projection manually. \n\n
+ It can be done using one of the following approaches:\n\n
+ a) AxMap.Projection property - provides only most common projections (Spherical Mercator, WGS84) but available in Properties Window of Form designer.
+ \code
+ axMap1.Projection = tkMapProjection.PROJECTION_WGS84;
+ \endcode
+ b) For all other projections - GeoProjection class and AxMap.GeoProjection property:
+ \code
+ var gp = new GeoProjection();
+
+ // one of the following methods can be used; see more in GeoProjection class
+ // - use projections provided by MapWinGIS enumerations:
+ gp.SetWgs84Projection(tkWgs84Projection.Wgs84_UTM_zone_22N);
+ gp.SetWellKnownGeogCS(tkCoordinateSystem.csNAD83);
+
+ // - EPSG code of coordinate system; in this example Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5; see wwww.spatialreference.org for EPSG codes
+ gp.ImportFromEPSG(2399);
+
+ // - importing from proj4 or WKT string; in this example proj4 string for Amersfoort / RD New projection for Netherlands
+ gp.ImportFromAutoDetect("+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs ");
+
+ // applying projection
+ axMap1.GeoProjection = gp;
+ \endcode
+
+ 2. Grabbing coordinate system and projection from data.
+ \code
+ axMap1.GrabProjectionFromData = true; // default value
+ axMap1.AddLayerFromFilename(@"d:\some_shapefile.shp", tkFileOpenStrategy.fosVectorLayer, true);
+ \endcode
+ GeoProjection will be taken from the first layer added to the map which has metadata about projection. AxMap.GeoProjection property will be updated from this metadata.
+ When last layer is removed from map AxMap.GeoProjection property will be cleared (set to empty projection).
+
+ 3. Don't specify coordinate system at all.\n
+ - AxMap.Projection property is equal to PROJECTION_NONE (the default value);
+ - map units should be set manually via AxMap.MapUnits;
+ - calculation of distance and area will use Euclidean geometry with no account to the shape of Earth;
+ - it won't be possible to display tiles from TMS servers.
+
+ To setup map to work without geoprojection use the code:
+ \code
+ axMap1.Projection = tkMapProjection.PROJECTION_NONE;
+ axMap1.GrabProjectionFromData = false;
+ axMap1.MapUnits = tkUnitsOfMeasure.umMeters; // or another, depending on the data you display
+ \endcode
+
+ \section proj2 B. Interaction with already set projection
+
+ To check that map actually has a projection:
+ \code
+ Debug.WriteLine("Map has projection:" + (axMap1.Projection != tkMapProjection.PROJECTION_NONE));
+ // or with mode details
+ Debug.WriteLine("Projection of the map: " + (axMap1.GeoProjection.IsEmpty() ? "None" : axMap1.GeoProjection.ExportToWKT());
+ \endcode
+
+ Another way to check whether map has geoprojection is to see how coordinates are displayed when AxMap.ShowCoordinates is set to cdmAuto.
+ In case decimal degrees are displayed (Lat/Lng) - map has geoprojection, if x/y pair is shown - no geoprojection was set.
+
+ All of these methods will result in updating AxMap.GeoProjection property. GeoProjection object assigned to map is protected from changes,
+ i.e. GeoProjection.IsFrozen = true. To change already assigned projection, a new instance of GeoProjection object must be created:
+ \code
+ // this one will fail, because projection is frozen
+ if (!axMap1.GeoProjection.ImportFromEPSG(2399))
+ {
+ Debug.WriteLine("Projection wasn't set: " + axMap1.GeoProjection.get_ErrorMsg(axMap1.GeoProjection.LastErrorCode));
+ }
+ // this one will succeed as a new GeoProjection instance is created by Clone method:
+ var gp = axMap1.GeoProjection.Clone();
+ if (gp.ImportFromEPSG(2399))
+ {
+ axMap1.GeoProjection = gp;
+ }
+ \endcode
+
+ Regardless of the method for settings projection MapWinGIS will update AxMap.MapUnits. IF coordinate system is geographic one umDecimalDegrees
+ will be set, otherwise umMeters. This will ensure that scalebar and measuring will work correctly.
+
+ \section proj3 C. Choosing projection
+
+ When making decision about coordinate system and projection consider:\n\n
+ 1. Whether it's important to display tiles from online services. Most TMS servers use Shperical Mercator projection (EPSG:3857),
+ therefore to avoid distortions of tiles map projection should be set to GoogleMercator as well:
+ \code
+ axMap1.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR;
+ \endcode
+ \note See more details on the issue in description of Tiles class.\n\n
+
+ 2. What data you plan to display and what projection it's using. It's possible to do a reprojection with:
+ - Utils.ReprojectShapefile for shapefiles;
+ - Utils.GDALWarp for images and grids.
+
+ But it should be considered whether it is worth the effort.
+
+ Starting from version 4.9.2. built-in projection mismatch testing is implemented + optional
+ transformation for shapefiles. See GlobalSettings.AllowProjectionMismatch, GlobalSettings.ReprojectLayersOnAdding.
+
+ @{
Gets measuring object associated with map.
@@ -1593,6 +1771,15 @@
This method affects the calculation of map scale (see AxMap.CurrentScale).
\new48 Added in version 4.8
+
+
+ Converts pixel coordinates to projected map coordinates
+
+ The x pixel coordinate to be converted into the projected x map coordinate.
+ The y pixel coordinate to be converted into the projected y map coordinate
+ The projected x map coordinate is returned through this reference parameter.
+ The projected y map coordinate is returned through this reference parameter.
+
Gets the number of screen pixels per the decimal degree of the data.
@@ -1600,6 +1787,15 @@
The set part of this property isn't supported. The correctness of results depends on AxMap.MapUnits property.
\new48 Added in version 4.8
+
+
+ Converts projected map coordinates into screen pixel units
+
+ The projected x map coordinate to be converted into the x pixel coordinate.
+ The projected y map coordinate to be converted into the y pixel coordinate.
+ The pixel x coordinate is returned through this reference parameter
+ The pixel y coordinate is returned through this reference parameter.
+
Gets or sets a value indicating whether coordinates of the current mouse position will be displayed on map.
@@ -1643,7 +1839,98 @@
This property must be set in order for certain functionality to work (tiles, for example).
\new490 Added in version 4.9.0
+
+
+ Converts projected map coordinates to decimal degrees (map projection must be specified for this method to work).
+
+ Projected X map coordinate.
+ Projected Y map coordinate.
+ Converted longitude in decimal degrees
+ Converted latitude in decimal degrees
+ True on success.
+ \new491 Added in version 4.9.1
+
+
+
+ Converts coordinates in decimal degrees to pixel coordinates (map projection must be specified for this method to work).
+
+ X screen coordinate.
+ Y screen coordinate.
+ Converted longitude in decimal degrees
+ Converted latitude in decimal degrees
+ True on success.
+ \new491 Added in version 4.9.1
+
+
+
+ Converts coordinates in decimal degrees to projected map coordinates (map projection must be specified for this method to work).
+
+ Longitude in decimal degrees.
+ Latitude in decimal degrees.
+ Resulting projected X map coordinate.
+ Resulting Projected Y map coordinate.
+ True on success.
+ \new491 Added in version 4.9.1
+
+
+
+ Converts pixel coordinates to decimal degrees (map projection must be specified for this method to work).
+
+ Longitude in decimal degrees.
+ Latitude in decimal degrees.
+ Converted X screen coordinate.
+ Converted Y screen coordinate.
+ True on success.
+ \new491 Added in version 4.9.1
+
+
+
+ Calculates area of polygon taking into account the shape of Earth.
+
+ For the time being only single-part polygons are accepted as input. Calculation are made using
+ GeographicLib.
+ Single part polygon shape defined in coordinates of map.
+ Area of shape in square meters or 0.0 if current map projection doesn't support transformation to WGS84.
+ \new493 Added in version 4.9.3
+
+
+
+ Calculates geodesic distance between 2 points defined in map coordinate system.
+
+ To calculate geodesic distance between 2 points in screen coordinates use AxMap.PixelToProj first.
+ Calculation are made using GeographicLib.
+ X coordinate of the first point.
+ Y coordinate of the first point.
+ X coordinate of the second point.
+ Y coordinate of the second point.
+ Distance between 2 points in meters 0.0 if current map projection doesn't support transformation to WGS84
+ \new493 Added in version 4.9.3
+
+
+
+ Calculates length of polyline or perimeter of polygon taking into account the shape of Earth.
+
+ For the time being only single-part shapes are accepted as input. Calculation are made using
+ GeographicLib.
+ Single part polygon or polyline shape defined in coordinates of map.
+ Length of polyline or perimeter of polygon in meters or 0.0 if current map projection doesn't support transformation to WGS84.
+ \new493 Added in version 4.9.3
+
+ \addtogroup map_events Map events
+ \dot
+ digraph map_events_graph {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="AxMap" URL="\ref AxMap"];
+ node [shape = "ellipse", color = gray, width = 0.2, height = 0.2, style = filled]
+ gr [label="Map events" URL="\ref map_events"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
This event is fired after the rendering of drawing layers. Handle of device context is passed to allow the user to implement custom drawing.
@@ -1655,6 +1942,19 @@
Passed by reference.
The value should be set to blnTrue in case some additional drawing is performed in client code.
+
+
+ This event is fired after the rendering of standard layers. Handle of device context is passed to allow the user to implement custom drawing.
+
+ Handle of device context of screen buffer.
+ Minimum X coordinate of the rectangle being rendered.
+ Maximum X coordinate of the rectangle being rendered.
+ Minimum Y coordinate of the rectangle being rendered.
+ Maximum Y coordinate of the rectangle being rendered.
+ Passed by reference.
+ The value should be set to blnTrue in case some additional drawing is performed in client code.
+ \new495 Added in version 4.9.5
+
This event is fired after interactive editing of shape is finished (AxMap.CursorMode is set to cmEditShape).
@@ -1714,6 +2014,19 @@
Passed by reference.
The value should be set to blnTrue in case some additional drawing is performed in client code.
+
+
+ This event is fired before the rendering of standard layers. Handle of device context is passed to allow the user to implement custom drawing.
+
+ Handle of device context of screen buffer.
+ Minimum X coordinate of the rectangle being rendered.
+ Maximum X coordinate of the rectangle being rendered.
+ Minimum Y coordinate of the rectangle being rendered.
+ Maximum Y coordinate of the rectangle being rendered.
+ Passed by reference.
+ The value should be set to blnTrue in case some additional drawing is performed in client code.
+ \new495 Added in version 4.9.5
+
This event is fired before editing starts for particular shape (after user click on the shape when map cursor is set to cmEditShape).
@@ -1947,6 +2260,13 @@
New API members to substitute deprecated ones are listed in description.
+
+
+ Gets or sets line separation factor.
+
+ \deprecated v4.8. Use LinePattern class, and ShapeDrawingOptions.LinePattern property instead.
+ \removed493 Removed in v4.9.3
+
Gets one user defined stipple row.
@@ -2485,6 +2805,15 @@
\deprecated v4.9.3 Use Utils.IsTiffGrid instead.
\removed493 Removed in v4.9.3.
+
+
+ Gets or sets the drawing method for vector layers.
+
+ The default value is vdmNewSymbology. From the version 4.8 this is the only value supported.
+ \new48 Added in version 4.8
+ \deprecated v4.8 No longer used.
+ \removed493 Removed in v4.9.3
+
Sets a coloring scheme to be associated with an image layer.
@@ -2730,6 +3059,14 @@
\deprecated v4.9.3 Use AxMap.get_LayerLabels, Labels.FontName, Labels.FontSize, Labels.FontBold, Labels.FontItalic, Labels.FontUnderline instead.
\removed493 Removed in v4.9.3
+
+
+ Gets or sets a boolean value which indicates whether multiline labels will be drawn correctly on the map.
+
+ \deprecated v 4.8. Multiline labels will be drawn after specification of appropriate label expression.
+ \see Labels.Expression.
+ \removed493 Removed in v4.9.3
+
Adds label to the specified drawing layer.
@@ -2876,6 +3213,13 @@
\deprecated v 4.9.3 Use AxMap.get_DrawingLabels, Labels.FontName, Labels.FontSize instead.
\removed493 Removed in v4.9.3
+
+
+ Gets or sets the angle of map rotation in degrees.
+
+ \deprecated v.4.9.3 The functionality is no longer supported.
+ \removed493 Removed in v4.9.3
+
Sets the numeric value which determines the transparency of the given image layer.
@@ -2935,46 +3279,6 @@
\deprecated v4.9.3 Use GeoProjection.get_IsSame, GeoProjection.get_IsSameExt instead.
\removed493 Removed in v4.9.3
-
-
- Deprecated. Updates the extents of the layer before the drawing.
-
- The handle of the layer.
- True on success and false in case of invalid layer handle.
- \deprecated v.4.8. The call is incorporated into drawing routine.
- \removed493 Removed in v4.9.3
-
-
-
- Gets or sets line separation factor.
-
- \deprecated v4.8. Use LinePattern class, and ShapeDrawingOptions.LinePattern property instead.
- \removed493 Removed in v4.9.3
-
-
-
- Gets or sets the drawing method for vector layers.
-
- The default value is vdmNewSymbology. From the version 4.8 this is the only value supported.
- \new48 Added in version 4.8
- \deprecated v4.8 No longer used.
- \removed493 Removed in v4.9.3
-
-
-
- Gets or sets a boolean value which indicates whether multiline labels will be drawn correctly on the map.
-
- \deprecated v 4.8. Multiline labels will be drawn after specification of appropriate label expression.
- \see Labels.Expression.
- \removed493 Removed in v4.9.3
-
-
-
- Gets or sets the angle of map rotation in degrees.
-
- \deprecated v.4.9.3 The functionality is no longer supported.
- \removed493 Removed in v4.9.3
-
Gets or sets a boolean value which indicates how images with identical size and position on the map will be drawn.
@@ -3009,5 +3313,24 @@
\deprecated v4.8 This property is no longer used.
\removed493 Removed in v4.9.3
+
+
+ Deprecated. Updates the extents of the layer before the drawing.
+
+ The handle of the layer.
+ True on success and false in case of invalid layer handle.
+ \deprecated v.4.8. The call is incorporated into drawing routine.
+ \removed493 Removed in v4.9.3
+
+
+
+ Justification of the labels
+
+
+
+
+ Shape drawing method
+
+
diff --git a/docs/AxInterop.MapWinGIS/AxMap.cs b/docs/AxInterop.MapWinGIS/AxMap.cs
index 4196ca27..8081488f 100644
--- a/docs/AxInterop.MapWinGIS/AxMap.cs
+++ b/docs/AxInterop.MapWinGIS/AxMap.cs
@@ -1,5 +1,6 @@
using System;
using MapWinGIS;
+#pragma warning disable 67 // Never used warning
#if nsp
namespace AxMapWinGIS
@@ -9,7 +10,8 @@ namespace AxMapWinGIS
/// Map component for visualization of vector, raster or grid data.
///
/// Here is a class diagram for the AxMap class:
- /// \dot digraph map_diagram {
+ /// \dot
+ /// digraph map_diagram {
/// nodesep = 0.3;
/// ranksep = 0.3;
/// splines = ortho;
@@ -316,21 +318,6 @@ public void LoadTilesForSnapshot(Extents extents, int width, string key, tkTileP
throw new NotImplementedException();
}
- ///
- /// Checks whether tiles for specified extents and provider are already present in cache.
- ///
- /// Extents to check for (map coordinates).
- /// Width of the canvas on which the extents will be displayed.
- /// Provider to load tiles from.
- /// 1 if tiles are in cache, 0 if not, -1 if an there was an error.
- /// The main purpose: loading of tiles for printing.
- /// \new491 Added in version 4.9.1
- // Removed in v4.9.4 again
- //public int TilesAreInCache(Extents extents, int width, tkTileProvider provider)
- //{
- // throw new NotImplementedException();
- //}
-
///
/// Performs specific type of map redraw.
///
@@ -713,6 +700,15 @@ public void ZoomToShape(int LayerHandle, int Shape)
/// \new492 Added in version 4.9.2
public int ZoomBarMaxZoom { get; set; }
+ ///
+ /// Gets or sets a value indicating whether to move the mouse click point to the center of the map
+ /// when using the Zoom In or Zoom Out tools.
+ ///
+ /// The default value is False, indicating that the map is not recentered,
+ /// but instead keeps the click point at the mouse position and zooms around that point.
+ /// \new495 Added in version 4.9.5
+ public bool RecenterMapOnZoom { get; set; }
+
///
/// Reverts the last operation performed by user in interactive shape editor.
///
@@ -2074,7 +2070,7 @@ public uint get_ShapeLayerStippleColor(int LayerHandle)
/// This property corresponds to the ShapeDrawingOptions.FillBgTransparent property.
/// This property corresponds to the ShapeDrawingOptions.FillHatchStyle property.
/// The handle of the shapefile layer.
- /// The color of stipple.
+ /// The color of stipple.
/// \see Shapefile.DefaultDrawingOptions
public void set_ShapeLayerStippleColor(int LayerHandle, uint newValue)
{
diff --git a/docs/AxInterop.MapWinGIS/Enums.cs b/docs/AxInterop.MapWinGIS/Enums.cs
index d2c8f49a..4086ea86 100644
--- a/docs/AxInterop.MapWinGIS/Enums.cs
+++ b/docs/AxInterop.MapWinGIS/Enums.cs
@@ -1,11 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-
-
+///
+/// Justification of the labels
+///
public enum tkHJustification { }
+
+///
+/// Shape drawing method
+///
public enum tkShapeDrawingMethod { }
diff --git a/docs/AxInterop.MapWinGIS/Properties/AssemblyInfo.cs b/docs/AxInterop.MapWinGIS/Properties/AssemblyInfo.cs
index 22f966f6..04f7f8b6 100644
--- a/docs/AxInterop.MapWinGIS/Properties/AssemblyInfo.cs
+++ b/docs/AxInterop.MapWinGIS/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AxInterop.MapWinGIS")]
-[assembly: AssemblyCopyright("Copyright © 2011")]
+[assembly: AssemblyCopyright("Copyright © 2011-2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/docs/DoxygenLayout.xml b/docs/DoxygenLayout.xml
index 9d9f674d..3a230b40 100644
--- a/docs/DoxygenLayout.xml
+++ b/docs/DoxygenLayout.xml
@@ -1,189 +1,189 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/Interop.MapWinGIS.XML b/docs/Interop.MapWinGIS.XML
index 76087c3f..0c2d93aa 100644
--- a/docs/Interop.MapWinGIS.XML
+++ b/docs/Interop.MapWinGIS.XML
@@ -210,129 +210,6 @@
The index of the field in the attribute table to take values from.
The colour of the sector or bar for visualization of a field.
-
-
- Clears the information about individual charts like position and visibility.
-
- To restore the charts a call of Charts.Generate() is needed. The fields
- will remain untouched by this method.
-
-
-
- Removes all fields which define bars or sectors of the chart.
-
-
-
-
- Restores the state of the charts from the serialized string.
-
- Serialized string generated by Charts.Serialize().
-
-
-
- Draws a chart on the specified device context. Can be used for displaying of map legend.
-
- The handle of the device context.
- The position of the left corner of the drawing in pixels.
- The position of the top corner of the drawing in pixels.
- When set to true the labels won't be drawn.
- The back colour of the device context.
- Should be provided to ensure correct alpha blending when transparency is set.
- True on success and false otherwise.
-
-
-
- Generates a chart for every shape of the parent shapefile.
-
- This method is time consuming for large shapefiles, therefore consider the serialization of
- charts data after first generation.
- The position of chart relative to the parent shape.
- True on success and false otherwise.
-
-
-
- Inserts a field which represents single bar or sector of the chart.
-
- The index to insert the field at.
- The chart field object to insert.
- True on success and false otherwise.
-
-
-
- Inserts a field which represents single bar or sector of the chart.
-
- The index to insert the field at.
- The index of the field from the attribute table (.dbf) to take values from.
- The colour of the fill.
- True on success and false otherwise.
-
-
-
- Loads charts data from the XML file generated by Charts.SaveToXML.
-
- The filename to load data from.
- True on successful loading and false otherwise.
-
-
-
- Changes the position of a field (bar or sector) in the list which affects the order of drawing.
-
- The old index of the field.
- The new index of the field.
-
-
-
-
- Removes the field which corresponds to the bar or the sector of the chart.
-
- The index of the field to remove.
- True on success and false otherwise.
-
-
-
- Saves the state of the charts to the XML file.
-
- Charts.SavingMode defines the particular data which will be serialized.
- The filename to save into.
- True on success and false otherwise.
-
-
-
- Returns the indices of charts which are displayed within specified rectangle on the screen.
-
- The rectangle to select charts within (in screen coordinates).
- The tolerance in pixels. The bounding box will be expanded by this values.
- The selection mode.
- The array of integer type with indices of the selected charts.
- True if at least one chart was selected and false otherwise.
-
-
-
- Serializes the state of the charts to the string.
-
- The serialized string.
-
-
-
- Gets a reference to the chart with the specified index.
-
- The index of the chart to extract.
- The reference to the chart of NULL reference on failure.
-
-
-
- Gets the description of the specified error code.
-
- The error code returned by Charts.LastErrorCode.
- The description of error.
-
-
-
- Gets a reference to the field of the chart with the specified index.
-
- The index of the field.
- The reference to the chart field or NULL reference on failure.
-
Gets or set a boolean value which indicates whether charts can overlap each other.
@@ -366,6 +243,18 @@
Bar and pie charts are available. All charts of the shapefile
are of the same type.
+
+
+ Clears the information about individual charts like position and visibility.
+
+ To restore the charts a call of Charts.Generate() is needed. The fields
+ will remain untouched by this method.
+
+
+
+ Removes all fields which define bars or sectors of the chart.
+
+
Gets or sets the minimal distance between individual charts when Charts.AvoidCollisions is set to true.
@@ -379,12 +268,39 @@
Returns the number of charts which is equal to the number of shapes in the parent shapefile.
+
+
+ Restores the state of the charts from the serialized string.
+
+ Serialized string generated by Charts.Serialize().
+
+
+
+ Draws a chart on the specified device context. Can be used for displaying of map legend.
+
+ The handle of the device context.
+ The position of the left corner of the drawing in pixels.
+ The position of the top corner of the drawing in pixels.
+ When set to true the labels won't be drawn.
+ The back colour of the device context.
+ Should be provided to ensure correct alpha blending when transparency is set.
+ True on success and false otherwise.
+
Gets or sets a value which indicates whether charts will be visible for all scales or in the given range of scales only.
\see Charts.MaxVisibleScale, Charts.MinVisibleScale
+
+
+ Generates a chart for every shape of the parent shapefile.
+
+ This method is time consuming for large shapefiles, therefore consider the serialization of
+ charts data after first generation.
+ The position of chart relative to the parent shape.
+ True on success and false otherwise.
+
Gets or sets a callback object to display progress and error information.
@@ -403,6 +319,23 @@
The property can be used for interactive selection of charts and for drawing of legend.
+
+
+ Inserts a field which represents single bar or sector of the chart.
+
+ The index to insert the field at.
+ The chart field object to insert.
+ True on success and false otherwise.
+
+
+
+ Inserts a field which represents single bar or sector of the chart.
+
+ The index to insert the field at.
+ The index of the field from the attribute table (.dbf) to take values from.
+ The colour of the fill.
+ True on success and false otherwise.
+
Gets or sets a string value associated with the object.
@@ -419,6 +352,13 @@
Gets or sets the color of the chart outline
+
+
+ Loads charts data from the XML file generated by Charts.SaveToXML.
+
+ The filename to load data from.
+ True on successful loading and false otherwise.
+
Get or sets the maximum scale the charts are displayed when dynamic visibility is turned on.
@@ -429,6 +369,14 @@
Gets or sets the minimal scale the charts are displayed when dynamic visibility is turned on.
+
+
+ Changes the position of a field (bar or sector) in the list which affects the order of drawing.
+
+ The old index of the field.
+ The new index of the field.
+
+
Gets or sets the index of field upon which the values of other fields will be divided before displaying charts.
@@ -472,11 +420,42 @@
This property is no implemented.
+
+
+ Removes the field which corresponds to the bar or the sector of the chart.
+
+ The index of the field to remove.
+ True on success and false otherwise.
+
+
+
+ Saves the state of the charts to the XML file.
+
+ Charts.SavingMode defines the particular data which will be serialized.
+ The filename to save into.
+ True on success and false otherwise.
+
Gets or sets the mode for serialization of charts. Affects Charts.SaveToXML method.
+
+
+ Returns the indices of charts which are displayed within specified rectangle on the screen.
+
+ The rectangle to select charts within (in screen coordinates).
+ The tolerance in pixels. The bounding box will be expanded by this values.
+ The selection mode.
+ The array of integer type with indices of the selected charts.
+ True if at least one chart was selected and false otherwise.
+
+
+
+ Serializes the state of the charts to the string.
+
+ The serialized string.
+
Gets or sets the index of field which affect the radius of charts when Charts.UseVariableRadius is set to true.
@@ -573,6 +552,27 @@
Turns on or off the visibility of charts.
+
+
+ Gets a reference to the chart with the specified index.
+
+ The index of the chart to extract.
+ The reference to the chart of NULL reference on failure.
+
+
+
+ Gets the description of the specified error code.
+
+ The error code returned by Charts.LastErrorCode.
+ The description of error.
+
+
+
+ Gets a reference to the field of the chart with the specified index.
+
+ The index of the field.
+ The reference to the chart field or NULL reference on failure.
+
@@ -592,16 +592,37 @@
\new494 Added in version 4.9.4
-
+
- Removes colour break with specified index.
+ Gets or set the callback object to report errors.
- The index of colour break to remove.
- True on successful removal and false otherwise.
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
+
- Clears all the existing breaks and creates 2 breaks with the specified colours.
+ Gets or sets the string value associated with the instance of the class.
+
+
+
+
+ Gets the code of the last error which occurred within this instance of class.
+
+
+
+
+ Returns the number of breaks within colour scheme.
+
+
+
+
+ Removes colour break with specified index.
+
+ The index of colour break to remove.
+ True on successful removal and false otherwise.
+
+
+
+ Clears all the existing breaks and creates 2 breaks with the specified colours.
The values of the breaks will be 0.0 for the first one and 1.0 for the second.
The colour of the first break.
@@ -681,27 +702,6 @@
The index of the break.
The new colour to set.
-
-
- Gets or set the callback object to report errors.
-
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
-
-
- Gets or sets the string value associated with the instance of the class.
-
-
-
-
- Gets the code of the last error which occurred within this instance of class.
-
-
-
-
- Returns the number of breaks within colour scheme.
-
-
Represents a layer downloading and displaying the data from the particular WMS Server.
@@ -726,6 +726,11 @@
String with the previous state of the layer.
True on success.
+
+
+ Gets the code of the last error which occurred inside this instance.
+
+
Gets error message for the specific error code.
@@ -733,11 +738,6 @@
The error code.
The error message.
-
-
- Gets the code of the last error which occurred inside this instance.
-
-
Gets or sets a key associated with this instance (any data can be stored in it by applications).
@@ -897,6 +897,11 @@
The column.
The row.
+
+
+ Gets the count.
+
+
Gets the layer handle for the item with specified pixel.
@@ -949,11 +954,6 @@
Column index or -1 if the specified item is a shape.
\new495 Added in version 4.9.5
-
-
- Gets the count.
-
-
Represents a single band of raster datasource.
@@ -1033,29 +1033,6 @@
The count.
True on success.
-
-
- Gets the specified metadata item.
-
- Index of the item.
- String with metadata.
-
-
-
- Gets specified overview of the raster band.
-
- Index of the overview.
- The overview as another instance of GdalRasterBand.
-
-
-
- Gets the value of the specified pixel.
-
- The column.
- The row.
- The value.
- True on success.
-
Gets no data value.
@@ -1131,17 +1108,45 @@
Gets the number of metadata items associated with the band.
+
+
+ Gets the specified metadata item.
+
+ Index of the item.
+ String with metadata.
+
Gets the color table associated with the band.
+
+
+ Gets specified overview of the raster band.
+
+ Index of the overview.
+ The overview as another instance of GdalRasterBand.
+
+
+
+ Gets the value of the specified pixel.
+
+ The column.
+ The row.
+ The value.
+ True on success.
+
Holds all available GDAL drivers.
\new494 Added in version 4.9.4
+
+
+ Gets the number of drivers.
+
+
Gets the specified driver.
@@ -1156,11 +1161,6 @@
Name of the driver.
The driver.
-
-
- Gets the number of drivers.
-
-
Represents a single GDAL driver.
@@ -1175,6 +1175,11 @@
The metadata.
String with metadata.
+
+
+ Gets the the number of metadata items associated with the driver.
+
+
Gets specified metadata item.
@@ -1182,6 +1187,21 @@
Index of the metadata item.
String with metadata.
+
+
+ Gets the name of the driver.
+
+
+
+
+ Gets a value indicating whether the driver works vector data.
+
+
+
+
+ Gets a value indicating whether the driver works raster data.
+
+
Gets the type of the specified metadata item.
@@ -1203,26 +1223,6 @@
Index of the metadata item.
Metadata item key.
-
-
- Gets the the number of metadata items associated with the driver.
-
-
-
-
- Gets the name of the driver.
-
-
-
-
- Gets a value indicating whether the driver works vector data.
-
-
-
-
- Gets a value indicating whether the driver works raster data.
-
-
Represents a light wrapper around GDAL raster dataset which allows to perform some
@@ -1274,30 +1274,16 @@
\new494 Added in version 4.9.4
-
-
- Gets the alias of the function.
-
- Index of the alias.
-
-
-
- Gets the name of the specified parameter.
-
- Index of the parameter.
- The name of the parameter.
-
-
+
- Gets the description of the specified parameter of the function.
+ Gets the name of the function.
- Index of the parameter.
- The description of the parameter.
-
+
- Gets the name of the function.
+ Gets the alias of the function.
+ Index of the alias.
@@ -1319,6 +1305,20 @@
Gets the description of the function.
+
+
+ Gets the name of the specified parameter.
+
+ Index of the parameter.
+ The name of the parameter.
+
+
+
+ Gets the description of the specified parameter of the function.
+
+ Index of the parameter.
+ The description of the parameter.
+
Gets the signature of the function.
@@ -1368,13 +1368,6 @@
The result of calculation (string, double, or boolean).
True on success.
-
-
- Gets the specified function from the list of function recognized by the expression parser.
-
- Index of the function.
- The function object with metadata.
-
Gets the last error message.
@@ -1390,6 +1383,13 @@
Gets the number of functions recognized by the expression parser.
+
+
+ Gets the specified function from the list of function recognized by the expression parser.
+
+ Index of the function.
+ The function object with metadata.
+
Gets the table associated with the current expression.
@@ -1469,6 +1469,12 @@
The filename of the ESRI grid to be deleted.
A boolean value representing the success or failure of deleting the specified ESRI grid.
+
+
+ The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
+
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+
Gets whether or not the specified file is an ESRI grid.
@@ -1476,6 +1482,11 @@
The filename of the grid to be checked.
A boolean value representing whether or not the specified file is an ESRI grid.
+
+
+ Retrieves the last error generated in the object.
+
+
Retrieves the error message associated with the specified error code.
@@ -1483,17 +1494,6 @@
The error code for which the error message is required.
The error message description for the specified error code.
-
-
- The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
-
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
-
-
- Retrieves the last error generated in the object.
-
-
Represents a rectangle on the map.
@@ -1566,50 +1566,19 @@
The new minimum measure bound for the extents object.
The new maximum measure bound for the extents object.
-
+
- Gets serialized contents of the extents for debug purposes.
+ The maximum measure bound in the exents object. Measure bounds only apply to shapefiles containing measure data.
- Serialized string.
- \new491 Added in version 4.9.1
-
+
- Moves extents so that center point will be at specified coordinates, while width and height will be preserved.
+ Gets the minimum measure bound for the extents object. Measure bounds only apply to shapefiles containing measure data.
- X coordinate of new center.
- Y coordinate of new center.
- \new491 Added in version 4.9.1
-
+
- Checks whether a point is within extents
-
- X coordinate of point
- Y coordinate of point
- True if point is within extents
- \new491 Added in version 4.9.1
-
-
-
- Creates a rectangular polygon matching current extents.
-
- New polygon shape.
- \new491 Added in version 4.9.1
-
-
-
- The maximum measure bound in the exents object. Measure bounds only apply to shapefiles containing measure data.
-
-
-
-
- Gets the minimum measure bound for the extents object. Measure bounds only apply to shapefiles containing measure data.
-
-
-
-
- The maximum x bound for the extents object.
+ The maximum x bound for the extents object.
@@ -1637,12 +1606,58 @@
Gets the minimum z bound for the extents object.
+
+
+ Gets serialized contents of the extents for debug purposes.
+
+ Serialized string.
+ \new491 Added in version 4.9.1
+
Gets a center point for the extents.
\new491 Added in version 4.9.1
+
+
+ Moves extents so that center point will be at specified coordinates, while width and height will be preserved.
+
+ X coordinate of new center.
+ Y coordinate of new center.
+ \new491 Added in version 4.9.1
+
+
+
+ Checks whether a point is within extents
+
+ X coordinate of point
+ Y coordinate of point
+ True if point is within extents
+ \new491 Added in version 4.9.1
+
+
+
+ Creates a rectangular polygon matching current extents.
+
+ New polygon shape.
+ \new491 Added in version 4.9.1
+
+
+
+ Gets the Width of the extents object (xMax - xMin).
+
+
+
+
+ Gets the Height of the extents object (yMax - yMin).
+
+
+
+
+ Gets the Depth of the extents object (zMax - zMin).
+
+
Provides settings for built-in identifier tool (cmIdentify cursor).
@@ -1701,6 +1716,23 @@
String generated with OgrLayer.Serialize method.
True on success.
+
+
+ Gets GeoProjection associated with current layer.
+
+
+ Corresponds to SRID set for the layer in underlying datasource.
+ When SRID isn't specified (i.e. equals 0), empty GeoProjection instance will be returned.
+
+
+
+ Gets the name of geometry column which was used to fetch geometry for current layer.
+
+ Depending on data format, a layer may support several geometry columns but
+ only one will be used to provide shape data via OgrLayer.GetBuffer(). By default
+ the first column with geometry/geography type will be used. To access other columns
+ temporary layers can be opened via OgrDatasource.RunQuery.
+
Gets layer data represented as in-memory shapefile.
@@ -1722,6 +1754,29 @@
The error code returned by LastErrorCode property.
String with the description.
+
+
+ Gets code of the last error which took place inside this object.
+
+
+
+
+ Gets or sets a Callback object which handles progress and error messages.
+
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+
+
+
+ A text string associated with object. Any value can be stored by developer in this property.
+
+
+
+
+ Gets name of the layer.
+
+ The name may correspond to table name in underlying database or store some generic string like
+ "sql_statement" for temporary layers opened by OgrDatasource.RunQuery.
+
Opens layer with specified name from the OGR datasource.
@@ -1780,6 +1835,34 @@
String with state information.
+
+
+ Gets shape type of the current layer.
+
+ The property automatically maps underlying OGRwkbGeometryType to corresponding shape type.
+
+
+
+ Gets "flattened" type of the current layer, i.e. Z and M components will be ignored.
+
+
+
+
+ Gets name of the driver which is used to access layer datasource.
+
+
+
+
+ Gets the array of available shape types inside OGR layer (should be cast to ShpfileType[]).
+
+ \new494 Added in version 4.9.4
+
+
+
+ Gets or sets the type of the active shape type for the layer (is used in OgrLayer.GetBuffer for example).
+
+ \new494 Added in version 4.9.4
+
Gets layer name or SQL query which was used to open this layer.
@@ -1836,12 +1919,42 @@
if information can't be retrieved from underlying datasource otherwise.
Number of features in the layer.
+
+
+ Gets source type of the layer.
+
+ Any new instance of class starts with ogrUninitialized. Successful call of OgrLayer.OpenFromDatabase
+ method will set it to ogrDbTable, OgrLayer.OpenFromQuery - to ogrQuery.
+ Source type.
+
+
+
+ Extracts the last error message reported by GDAL library.
+
+
Clears all the styles stored for current layer in datasource.
True on success.
+
+
+ Gets or sets a value indicating whether features for large layers are to be loaded dynamically
+ when moving to the new portions of map.
+
+ When set to false only the number of features set by OgrLayer.MaxFeatureCount
+ is loaded into memory. No further attempts to load additional features will be done.\n
+
+ In dynamic loading mode after map extents change a check is made
+ whether features for the requested extents are already in memory. If not the data loading
+ is started in the background thread. When the loading is over all the features currently stored
+ in memory will be discarded. If the amount of features in new map extents exceeds
+ OgrLayer.MaxFeatureCount no background loading will be done. \n
+
+ The mode is chosen automatically when the layer is opened depending on the number of features.
+ But afterwards it's possible possible to change the value.
+
Generates visualization categories for OGR layer.
@@ -1926,6 +2039,39 @@
\endcode
Number of styles.
+
+
+ Gets or sets an expression for label generation for the layer.
+
+ The syntax of expression is the same as for Shapefile.Labels.Generate method. To
+ generate labels based on single field use "[FieldName]" syntax. The property is supported
+ for dynamic loading mode, where labels will be generated on the fly after each zooming
+ operation.
+
+
+
+
+ Gets or sets label orientation for polyline layers.
+
+ \see OgrLayer.LabelExpression
+
+
+
+ Gets or sets position of labels relative to their parent features.
+
+ \see OgrLayer.LabelExpression
+
+
+
+ Gets or sets maximum number of features to be loaded in the memory.
+
+ If total number of features exceeds this number the layer will be rendered
+ in dynamic loading mode (see OgrLayer.DynamicLoading). During dynamic loading if
+ number of features for the new map extents exceeds this number they won't be loaded. The default
+ value of property can be changed with GlobalSettings.OgrLayerMaxFeatureCount.
+
+ \see OgrLayer.GetBuffer
+
Removes style with particular name from the datasource.
@@ -1933,6 +2079,13 @@
The name of the style.
True on success.
+
+
+ Checks whether the layers supports saving of styles to the datasource.
+
+ This property will check the presence of mw_styles table in the datasource and then
+ will try to create one if it's missing. If neither succeeds, false will be returned.
+
Gets name of the style with particular index.
@@ -1940,23 +2093,7 @@
Index of style.
Name of the style.
-
-
- Gets a value indicating whether the layer supports editing.
-
-
- The property works like this:\n
- 1) checks whether underlying driver supports random write operation:
- OgrLayer.TestCapability(tkOgrLayerCapability::olcRandomWrite);\n
- 2) the presence of Feature Id column is verified;\n
- 3) checks if the data is still in the same projection (OgrLayer.DataIsReprojected).\n
-
- OgrLayer.SaveChanges method doesn't make the first check, thus trying to write
- the data even if functionality isn't advertised by driver.
-
- The requested type of editing.
- True in case editing is supported.
-
+
Gets a specified error message from the log registered during OgrLayer.SaveChanges call.
@@ -1972,6 +2109,32 @@
Error index.
Index of shape in underlying in-memory shapefile (OgrLayer.GetBuffer()).
+
+
+ Gets the number of errors registered in the log during OgrLayer.SaveChanges call.
+
+
+
+
+ Gets name of feature ID column.
+
+ Feature ID column corresponds to primary key in underlying database table.
+ It is used to uniquely identify features and to save changes back to datasource.
+ Feature ID column (if present) will always be inserted as a first field of attribute
+ table of underlying shapefile. This field must not be edited.\n
+
+ For inserted features the column values are set to NULL. \n
+
+ In case underlying datasource doesn't have feature ID column, an empty string will be returned.
+
+
+
+ Gets a value indicating whether underlying data ( OgrLayer.GetBuffer ) was reprojected.
+
+
+ This may happen because of projection mismatch on adding it to the map. See GlobalSettings.ReprojectLayersOnAdding for details.
+
+
Saves local changes to the datasource.
@@ -1998,173 +2161,9 @@
i.e. invalid shapes won't be saved.
Result of the operation.
-
+
- Gets GeoProjection associated with current layer.
-
-
- Corresponds to SRID set for the layer in underlying datasource.
- When SRID isn't specified (i.e. equals 0), empty GeoProjection instance will be returned.
-
-
-
- Gets the name of geometry column which was used to fetch geometry for current layer.
-
- Depending on data format, a layer may support several geometry columns but
- only one will be used to provide shape data via OgrLayer.GetBuffer(). By default
- the first column with geometry/geography type will be used. To access other columns
- temporary layers can be opened via OgrDatasource.RunQuery.
-
-
-
- Gets code of the last error which took place inside this object.
-
-
-
-
- Gets or sets a Callback object which handles progress and error messages.
-
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
-
-
- A text string associated with object. Any value can be stored by developer in this property.
-
-
-
-
- Gets name of the layer.
-
- The name may correspond to table name in underlying database or store some generic string like
- "sql_statement" for temporary layers opened by OgrDatasource.RunQuery.
-
-
-
- Gets shape type of the current layer.
-
- The property automatically maps underlying OGRwkbGeometryType to corresponding shape type.
-
-
-
- Gets "flattened" type of the current layer, i.e. Z and M components will be ignored.
-
-
-
-
- Gets name of the driver which is used to access layer datasource.
-
-
-
-
- Gets the array of available shape types inside OGR layer (should be cast to ShpfileType[]).
-
- \new494 Added in version 4.9.4
-
-
-
- Gets or sets the type of the active shape type for the layer (is used in OgrLayer.GetBuffer for example).
-
- \new494 Added in version 4.9.4
-
-
-
- Gets source type of the layer.
-
- Any new instance of class starts with ogrUninitialized. Successful call of OgrLayer.OpenFromDatabase
- method will set it to ogrDbTable, OgrLayer.OpenFromQuery - to ogrQuery.
- Source type.
-
-
-
- Extracts the last error message reported by GDAL library.
-
-
-
-
- Gets or sets a value indicating whether features for large layers are to be loaded dynamically
- when moving to the new portions of map.
-
- When set to false only the number of features set by OgrLayer.MaxFeatureCount
- is loaded into memory. No further attempts to load additional features will be done.\n
-
- In dynamic loading mode after map extents change a check is made
- whether features for the requested extents are already in memory. If not the data loading
- is started in the background thread. When the loading is over all the features currently stored
- in memory will be discarded. If the amount of features in new map extents exceeds
- OgrLayer.MaxFeatureCount no background loading will be done. \n
-
- The mode is chosen automatically when the layer is opened depending on the number of features.
- But afterwards it's possible possible to change the value.
-
-
-
- Gets or sets an expression for label generation for the layer.
-
- The syntax of expression is the same as for Shapefile.Labels.Generate method. To
- generate labels based on single field use "[FieldName]" syntax. The property is supported
- for dynamic loading mode, where labels will be generated on the fly after each zooming
- operation.
-
-
-
-
- Gets or sets label orientation for polyline layers.
-
- \see OgrLayer.LabelExpression
-
-
-
- Gets or sets position of labels relative to their parent features.
-
- \see OgrLayer.LabelExpression
-
-
-
- Gets or sets maximum number of features to be loaded in the memory.
-
- If total number of features exceeds this number the layer will be rendered
- in dynamic loading mode (see OgrLayer.DynamicLoading). During dynamic loading if
- number of features for the new map extents exceeds this number they won't be loaded. The default
- value of property can be changed with GlobalSettings.OgrLayerMaxFeatureCount.
-
- \see OgrLayer.GetBuffer
-
-
-
- Checks whether the layers supports saving of styles to the datasource.
-
- This property will check the presence of mw_styles table in the datasource and then
- will try to create one if it's missing. If neither succeeds, false will be returned.
-
-
-
- Gets the number of errors registered in the log during OgrLayer.SaveChanges call.
-
-
-
-
- Gets name of feature ID column.
-
- Feature ID column corresponds to primary key in underlying database table.
- It is used to uniquely identify features and to save changes back to datasource.
- Feature ID column (if present) will always be inserted as a first field of attribute
- table of underlying shapefile. This field must not be edited.\n
-
- For inserted features the column values are set to NULL. \n
-
- In case underlying datasource doesn't have feature ID column, an empty string will be returned.
-
-
-
- Gets a value indicating whether underlying data ( OgrLayer.GetBuffer ) was reprojected.
-
-
- This may happen because of projection mismatch on adding it to the map. See GlobalSettings.ReprojectLayersOnAdding for details.
-
-
-
-
- Facilitates interactive creation and editing of vector shapes.
+ Facilitates interactive creation and editing of vector shapes.
@@ -2274,6 +2273,24 @@
\new493 Added in version 4.9.3
+
+
+ Calculates the area of polygon being edited.
+
+ Precise calculations on ellipsoid will be used if map projection is set and compatible
+ with WGS84. Otherwise simply Euclidean geometry will be used.
+
+
+
+ Gets or sets type of the bearing to be display for line segments.
+
+ \new493 Added in version 4.9.3
+
+
+
+ Gets or sets area display mode for polygon shapes. The default value is admNone.
+
+
Clears the editor returning it to an empty state.
@@ -2289,193 +2306,68 @@
Instance of visualization options.
\see Shapefile.DefaultDrawingOptions
-
+
- Saves any changes made by user.
+ Gets or sets editor behavior during the editing of existing shape, either vertex editor or part editor.
- The editor will try to validate underlying shape on this call. If validation succeeds
- the changes will be passed to the original shapefile or other actions defined by
- current interactive tool will be triggered.
- Depending on editor state the actions will be:
- - esDigitize: new shape will be added to the shapefile set by ShapeEditor.LayerHandle property;
- - esEdit: shapefile will be updated with modified version of shape;
- - esDigitizeUnbound: a tool which started the unbound mode execute the appropriate action
- (clipping, selection by polygon, etc.);
- - esOverlay: current overlay operation (i.e. eoAddPart or eoRemovePart) will be discarded, editor
- will return in esEdit state after which an attempt will be made to validate and save shape in regular manner.
-
- True on success.
- \see AxMap.CursorMode, ShapeEditor.EditorState
-
+
- Saves the state of the class to the string
+ Gets the state an editor is currently in. See tkEditorState enumeration for details.
- A string with the state or an empty string on failure.
-
+
- Restores the state of object from the string.
+ Gets or sets fill color for the shape being edited. Applies for polygon shapes only.
- A string generated by ShapeEditor.Serialize() method
- True on success.
-
+
- Starts editing of a given shape in specified shapefile.
+ Gets or sets fill transparency for the shape being edited. Applies for polygon shapes only.
- Layer handle of the shapefile.
- Index of shape to edit.
- True on success.
- The method will populate the editor with vertices of specified shape,
- hide original shape with Shapefile.put_ShapeIsHidden and set ShapeEditor.EditorState to esEdit.
-
+
- Starts overlay operation for the current shape.
+ Gets or sets a Callback object which handles progress and error messages.
- Editor must be in esEdit state already, i.e. ShapeEditor.StartEdit must be called first.
- Type of overlay operation.
- True on success.
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
+
- Initializes editor for creation of unbound shape.
+ Returns true if editor has changes caused by user input.
- Unbound shape is the one which is not linked to particular shapefile. This
- method is used internally by a number of built-in tools,
- like cmSelectByPolygon or cmSplitByPolyline.
- Type of shape to be created.
- True on success.
-
+
- Allows to undo the last vertex entered by user.
+ Gets a value indicating whether calculations are performed taking into account the shape of Earth
+ (when map projection is defined), or on 2D plane (Euclidean geometry).
- The method works when new shape is being created, i.e. ShapeEditor.IsDigitizing return true.
- True on success, false if the editor is empty and there is no points to undo.
-
+
- Gets the description of the specific error code.
+ Gets the length of measured path (in meters if WGS84 compatible projection is set for map and in current map units otherwise).
- The error code returned by LastErrorCode property.
- String with the description.
-
+
- Gets coordinates of specified point of edited shape.
+ Gets or sets a value indicating whether area will be displayed during creation or editing of polygons.
- Index of point.
- X in projected map coordinates.
- Y in projected map coordinates.
- True if index of point within bounds.
-
+
- Sets coordinates of specified point of edited shape.
+ Gets or sets the number of decimal degrees to be used to display area.
- Index of point.
- X in projected map coordinates.
- Y in projected map coordinates.
- True if index of point within bounds.
+ \new493 Added in version 4.9.3
-
+
- Returns directional angle (bearing) of a given segment of edited shape.
+ Gets or sets the number of decimal degrees to be used to display length.
- Segment index to calculate angle for.
- Angle in degrees.
+ \new493 Added in version 4.9.3
-
+
- Gets length of a given segment of edited shape.
-
- Segment index to calculate length for.
- Length of segment in meters.
- If map projection is set and compatible with WGS84 geodesic distance will be returned.
- Otherwise Euclidean geometry will be used.
-
-
-
- Calculates the area of polygon being edited.
-
- Precise calculations on ellipsoid will be used if map projection is set and compatible
- with WGS84. Otherwise simply Euclidean geometry will be used.
-
-
-
- Gets or sets type of the bearing to be display for line segments.
-
- \new493 Added in version 4.9.3
-
-
-
- Gets or sets area display mode for polygon shapes. The default value is admNone.
-
-
-
-
- Gets or sets editor behavior during the editing of existing shape, either vertex editor or part editor.
-
-
-
-
- Gets the state an editor is currently in. See tkEditorState enumeration for details.
-
-
-
-
- Gets or sets fill color for the shape being edited. Applies for polygon shapes only.
-
-
-
-
- Gets or sets fill transparency for the shape being edited. Applies for polygon shapes only.
-
-
-
-
- Gets or sets a Callback object which handles progress and error messages.
-
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
-
-
- Returns true if editor has changes caused by user input.
-
-
-
-
- Gets a value indicating whether calculations are performed taking into account the shape of Earth
- (when map projection is defined), or on 2D plane (Euclidean geometry).
-
-
-
-
- Gets the length of measured path (in meters if WGS84 compatible projection is set for map and in current map units otherwise).
-
-
-
-
- Gets or sets a value indicating whether area will be displayed during creation or editing of polygons.
-
-
-
-
- Gets or sets the number of decimal degrees to be used to display area.
-
- \new493 Added in version 4.9.3
-
-
-
- Gets or sets the number of decimal degrees to be used to display length.
-
- \new493 Added in version 4.9.3
-
-
-
- Gets or sets angle format to be used to display bearing.
+ Gets or sets angle format to be used to display bearing.
\new493 Added in version 4.9.3
@@ -2561,6 +2453,37 @@
Gets underlying shape data without any attempt to validate it.
+
+
+ Saves any changes made by user.
+
+ The editor will try to validate underlying shape on this call. If validation succeeds
+ the changes will be passed to the original shapefile or other actions defined by
+ current interactive tool will be triggered.
+ Depending on editor state the actions will be:
+ - esDigitize: new shape will be added to the shapefile set by ShapeEditor.LayerHandle property;
+ - esEdit: shapefile will be updated with modified version of shape;
+ - esDigitizeUnbound: a tool which started the unbound mode execute the appropriate action
+ (clipping, selection by polygon, etc.);
+ - esOverlay: current overlay operation (i.e. eoAddPart or eoRemovePart) will be discarded, editor
+ will return in esEdit state after which an attempt will be made to validate and save shape in regular manner.
+
+ True on success.
+ \see AxMap.CursorMode, ShapeEditor.EditorState
+
+
+
+ Saves the state of the class to the string
+
+ A string with the state or an empty string on failure.
+
+
+
+ Restores the state of object from the string.
+
+ A string generated by ShapeEditor.Serialize() method
+ True on success.
+
Gets or sets the index of currently selected vertex.
@@ -2589,6 +2512,41 @@
Gets or sets snapping tolerance in screen coordinates.
+
+
+ Starts editing of a given shape in specified shapefile.
+
+ Layer handle of the shapefile.
+ Index of shape to edit.
+ True on success.
+ The method will populate the editor with vertices of specified shape,
+ hide original shape with Shapefile.put_ShapeIsHidden and set ShapeEditor.EditorState to esEdit.
+
+
+
+ Starts overlay operation for the current shape.
+
+ Editor must be in esEdit state already, i.e. ShapeEditor.StartEdit must be called first.
+ Type of overlay operation.
+ True on success.
+
+
+
+ Initializes editor for creation of unbound shape.
+
+ Unbound shape is the one which is not linked to particular shapefile. This
+ method is used internally by a number of built-in tools,
+ like cmSelectByPolygon or cmSplitByPolyline.
+ Type of shape to be created.
+ True on success.
+
+
+
+ Allows to undo the last vertex entered by user.
+
+ The method works when new shape is being created, i.e. ShapeEditor.IsDigitizing return true.
+ True on success, false if the editor is empty and there is no points to undo.
+
Validates the data stored by editor and returns it as a shape.
@@ -2605,6 +2563,47 @@
Gets or sets value indicating whether vertices edited shapes are visible.
+
+
+ Gets the description of the specific error code.
+
+ The error code returned by LastErrorCode property.
+ String with the description.
+
+
+
+ Gets coordinates of specified point of edited shape.
+
+ Index of point.
+ X in projected map coordinates.
+ Y in projected map coordinates.
+ True if index of point within bounds.
+
+
+
+ Sets coordinates of specified point of edited shape.
+
+ Index of point.
+ X in projected map coordinates.
+ Y in projected map coordinates.
+ True if index of point within bounds.
+
+
+
+ Returns directional angle (bearing) of a given segment of edited shape.
+
+ Segment index to calculate angle for.
+ Angle in degrees.
+
+
+
+ Gets length of a given segment of edited shape.
+
+ Segment index to calculate length for.
+ Length of segment in meters.
+ If map projection is set and compatible with WGS84 geodesic distance will be returned.
+ Otherwise Euclidean geometry will be used.
+
Gets number of points the shape being edited has.
@@ -2702,6 +2701,21 @@
Clears all previously added operations
+
+
+ Gets the number of added operations.
+
+
+
+
+ A text string associated with object. Any value can be stored by developer in this property.
+
+
+
+
+ Gets the code of last error which took place inside this object.
+
+
Removes operations with specified index.
@@ -2764,22 +2778,38 @@
Index of operation to check the property for.
Reason for invalidity or fovValid in operation is applicable.
-
+
+
- Gets the number of added operations.
+ Gets or sets a Callback object which handles progress and error messages.
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
+
A text string associated with object. Any value can be stored by developer in this property.
-
+
Gets the code of last error which took place inside this object.
-
+
+
+ Gets filename of the last datasource that was attempted to be opened.
+
+
+
+
+ Gets a value indicating whether the last attempt to open a datasource was successful.
+
+
+
+
+ Gets a strategy that was used on last attempt to open datasource.
+
+
Tries to open datasource with specified name.
@@ -2923,79 +2953,48 @@
Filename of grid datasource.
True if proxy images exist.
-
+
- Tries to open specified file as OGR datasource.
+ Gets expression to be set for OpenFileDialog.Filter property to select supported datasources.
- Filename of the datasource to be opened.
- Instance of OgrDatasource or null on failure.
\new493 Added in version 4.9.3
-
+
- Tries to open specified file as OGR layer.
+ Gets expression to be set for OpenFileDialog.Filter property to select raster datasources (both RGB images and grids).
- When preferedShapeType is set to default ShpfileType.SHP_NULLSHAPE value or there is no layer
- with preferedShapeType, then the first layer in datasource will be returned.
- Filename of the datasource to be opened.
- Sets type of layer to be returned from datasource in case there are multiple layers available.
- True in case layer should be open in read/write mode.
- Instance of OgrLayer or null on failure.
\new493 Added in version 4.9.3
-
+
- Gets or sets a Callback object which handles progress and error messages.
+ Gets expression to be set for OpenFileDialog.Filter property to select vector datasources.
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+ \new493 Added in version 4.9.3
-
-
- A text string associated with object. Any value can be stored by developer in this property.
-
-
-
-
- Gets the code of last error which took place inside this object.
-
-
-
-
- Gets filename of the last datasource that was attempted to be opened.
-
-
-
-
- Gets a value indicating whether the last attempt to open a datasource was successful.
-
-
-
-
- Gets a strategy that was used on last attempt to open datasource.
-
-
-
-
- Gets expression to be set for OpenFileDialog.Filter property to select supported datasources.
-
- \new493 Added in version 4.9.3
-
-
+
- Gets expression to be set for OpenFileDialog.Filter property to select raster datasources (both RGB images and grids).
+ Gets string with the list of supported GDAL formats.
\new493 Added in version 4.9.3
-
+
- Gets expression to be set for OpenFileDialog.Filter property to select vector datasources.
+ Tries to open specified file as OGR datasource.
+ Filename of the datasource to be opened.
+ Instance of OgrDatasource or null on failure.
\new493 Added in version 4.9.3
-
+
- Gets string with the list of supported GDAL formats.
+ Tries to open specified file as OGR layer.
+ When preferedShapeType is set to default ShpfileType.SHP_NULLSHAPE value or there is no layer
+ with preferedShapeType, then the first layer in datasource will be returned.
+ Filename of the datasource to be opened.
+ Sets type of layer to be returned from datasource in case there are multiple layers available.
+ True in case layer should be open in read/write mode.
+ Instance of OgrLayer or null on failure.
\new493 Added in version 4.9.3
@@ -3039,13 +3038,6 @@
The copy of the field.
\new48 Added in version 4.8
-
-
- Retrieves the error message associated with the specified error code.
-
- The error code for which the error message is required.
- The error message description for the specified error code.
-
The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
@@ -3116,6 +3108,13 @@
Gets or sets the width of the field.
+
+
+ Retrieves the error message associated with the specified error code.
+
+ The error code for which the error message is required.
+ The error message description for the specified error code.
+
Holds information about coordinate system and projection of the data.
@@ -3218,6 +3217,18 @@
The string with WKT projection.
+
+
+ Returns the name of the coordinate system.
+
+ An empty string will be returned unless GeoProjection.IsGeographic property returns true.
+
+
+
+ Gets or sets a callback object which is used to report errors.
+
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+
Initializes geoprojection from the input string of arbitrary format.
@@ -3254,6 +3265,55 @@
The string in the OGC WKT format.
True on success and false otherwise.
+
+
+ Returns the inverse flattening of the reference ellipsoid of the coordinate system.
+
+
+
+
+ Gets a boolean value which indicates whether any projection definition is stored in the object.
+
+
+
+
+ Gets a boolean value which indicates whether the coordinate system stored in the object is the geographic one.
+
+
+
+
+ Gets a boolean value which indicates whether the coordinate system stored in the object is the local one.
+
+
+
+
+ Gets a boolean value which indicates whether the coordinate system stored in the object is the projected one.
+
+
+
+
+ A text string associated with the instance of the class. Any value can be stored by developer in this property.
+
+
+
+
+ Retrieves the numeric code of the last error that took place in the class.
+
+ The usage of this property clears the error code.
+
+
+
+ Returns the name of the coordinate system.
+
+ Either GeoProjection.GeogCSName or GeoProjection.ProjectionName will be returned
+ depending on the type of coordinate system.
+
+
+
+ The name of the projected coordinate system.
+
+ An empty string will be returned unless GeoProjection.IsProjected property returns true.
+
Initializes geoprojection from the specified file.
@@ -3263,6 +3323,16 @@
The name of the file to read projection string from.
True on success and false otherwise.
+
+
+ Returns the half of the major axis of the reference ellipsoid.
+
+
+
+
+ Returns the half of the minor axis of the reference ellipsoid.
+
+
Initializes the object with NAD83 projection specified by enumerated constant.
@@ -3337,6 +3407,11 @@
The returned value of the parameter.
True on success and false otherwise.
+
+
+ Gets a value indicating whether transformation to some target projection was opened with GeoProjection.StartTransform() call.
+
+
Opens transformation to the specified target projection. The transformation will be used by GeoProjection.
@@ -3375,6 +3450,16 @@
as ExportToWKT may add defaults for parameters missing in initial Proj4 definition.
\new491 Added in version 4.9.1
+
+
+ Gets a value indicating whether the object can be changed.
+
+
+ When frozen all the methods which can change the inner state of object will fail.
+ The property is set to true for map projection applied with AxMap.SetGeoProjection (see details there).
+
+ \new491 Added in version 4.9.1
+
Sets so called Google Mercator projection (aka Spherical Mercator; EPSG:3857),
@@ -3404,6 +3489,11 @@
True on success.
\new491 Added in version 4.9.1
+
+
+ Gets the linear units from projection definition.
+
+
Writes projection string to a file.
@@ -3429,97 +3519,6 @@
Resulting string.
\new494 Added in version 4.9.4
-
-
- Returns the name of the coordinate system.
-
- An empty string will be returned unless GeoProjection.IsGeographic property returns true.
-
-
-
- Gets or sets a callback object which is used to report errors.
-
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
-
-
- Returns the inverse flattening of the reference ellipsoid of the coordinate system.
-
-
-
-
- Gets a boolean value which indicates whether any projection definition is stored in the object.
-
-
-
-
- Gets a boolean value which indicates whether the coordinate system stored in the object is the geographic one.
-
-
-
-
- Gets a boolean value which indicates whether the coordinate system stored in the object is the local one.
-
-
-
-
- Gets a boolean value which indicates whether the coordinate system stored in the object is the projected one.
-
-
-
-
- A text string associated with the instance of the class. Any value can be stored by developer in this property.
-
-
-
-
- Retrieves the numeric code of the last error that took place in the class.
-
- The usage of this property clears the error code.
-
-
-
- Returns the name of the coordinate system.
-
- Either GeoProjection.GeogCSName or GeoProjection.ProjectionName will be returned
- depending on the type of coordinate system.
-
-
-
- The name of the projected coordinate system.
-
- An empty string will be returned unless GeoProjection.IsProjected property returns true.
-
-
-
- Returns the half of the major axis of the reference ellipsoid.
-
-
-
-
- Returns the half of the minor axis of the reference ellipsoid.
-
-
-
-
- Gets a value indicating whether transformation to some target projection was opened with GeoProjection.StartTransform() call.
-
-
-
-
- Gets a value indicating whether the object can be changed.
-
-
- When frozen all the methods which can change the inner state of object will fail.
- The property is set to true for map projection applied with AxMap.SetGeoProjection (see details there).
-
- \new491 Added in version 4.9.1
-
-
-
- Gets the linear units from projection definition.
-
-
An interface for callback objects which can be used to return information about progress and errors.
@@ -3571,62 +3570,13 @@
Such properties may be removed afterwards (GlobalSettings.ShapefileFastUnion for example).
\new48 Added in version 4.8
-
+
- Clears information about last GDAL error.
+ Gets a sets a value which defines the multiplication coefficient for data in decimal degrees.
- Affects GdalLastErrorMsg, GdalLastErrorNo, GdalLastErrorType, GdalReprojectionErrorMsg properties.
+ The value is used for Clipper library due to the lack of built-in scaling in it. The default value is 10000.0.
-
-
- Gets the localized version for a specified string used in GUI.
-
- String to get localized version for.
- Localized string.
- \new491 Added in version 4.9.1
-
-
-
- Sets the localized version for a specified string used in GUI.
-
- String to set localized version for.
- Localized string.
- \new491 Added in version 4.9.1
-
-
-
- Sets application credentials for Here Maps online tiles.
- Without these credentials Here Maps providers are not available. See
- details here.
-
- Application Id. Can be obtained by registering on the site of the service.
- Application code. Can be obtained by registering on the site of the service.
- \new493 Added in version 4.9.3
-
-
-
- Requests URL address for tiles download from Bing Maps server.
-
- API key to test.
- True if the Url for downloading for obtained.
- \new493 Added in version 4.9.3
-
-
-
- Starts logging of tile requests.
-
- The filename.
- If set to true only errors will be logged.
- True on success.
- \new494 Added in version 4.9.4
-
-
-
- Gets a sets a value which defines the multiplication coefficient for data in decimal degrees.
-
- The value is used for Clipper library due to the lack of built-in scaling in it. The default value is 10000.0.
-
-
+
Gets or sets a value which is used to weed out long narrow "splintered" polygons generated by geoprocessing routines.
@@ -3682,6 +3632,12 @@
The default value is HighQualityMode.
+
+
+ Clears information about last GDAL error.
+
+ Affects GdalLastErrorMsg, GdalLastErrorNo, GdalLastErrorType, GdalReprojectionErrorMsg properties.
+
Gets or sets a value which affects the speed of Shapefile.Union operation.
@@ -3736,6 +3692,22 @@
\new491 Added in version 4.9.1
+
+
+ Gets the localized version for a specified string used in GUI.
+
+ String to get localized version for.
+ Localized string.
+ \new491 Added in version 4.9.1
+
+
+
+ Sets the localized version for a specified string used in GUI.
+
+ String to set localized version for.
+ Localized string.
+ \new491 Added in version 4.9.1
+
Gets or sets colour scheme to be used for rendering grids.
@@ -3983,6 +3955,24 @@
\new493 Added in version 4.9.3
+
+
+ Sets application credentials for Here Maps online tiles.
+ Without these credentials Here Maps providers are not available. See
+ details here.
+
+ Application Id. Can be obtained by registering on the site of the service.
+ Application code. Can be obtained by registering on the site of the service.
+ \new493 Added in version 4.9.3
+
+
+
+ Requests URL address for tiles download from Bing Maps server.
+
+ API key to test.
+ True if the Url for downloading for obtained.
+ \new493 Added in version 4.9.3
+
Gets or sets the value indicating which compression mode will be used to compress image overviews.
@@ -4055,6 +4045,22 @@
\new494 Added in version 4.9.4
+
+
+ Share connection between layers (may be unstable).
+ For large read-only layers it will increase performance.
+
+ \new494 Added in version 4.9.4
+
+
+
+ Starts logging of tile requests.
+
+ The filename.
+ If set to true only errors will be logged.
+ True on success.
+ \new494 Added in version 4.9.4
+
@@ -4063,6 +4069,11 @@
Projection string in proj4 format.
True on success or false otherwise.
+
+
+ Returns the common dialog filter containing all supported file extensions in string format.
+
+
Uses a cell's column and row position to find the center of the cell in projected map coordinates.
@@ -4099,6 +4110,16 @@
Optional. The ICallback object that will receive the progress and error events during the creation of the new grid.
A boolean value representing the success or failure of the creation of the new grid.
+
+
+ Returns the data type of the values stored in the grid.
+
+
+
+
+ The filename associated with the object.
+
+
Returns an array with grid values which lie within specified bounds.
@@ -4124,6 +4145,32 @@
Reference to the first element of the array of floats that will hold the row of values.
True on success and false otherwise.
+
+
+ The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
+
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+
+
+
+ Returns the header of the grid.
+
+
+
+
+ Returns whether the grid is loaded in to RAM memory or not.
+
+
+
+
+ The key may be used by the programmer to store any string data associated with the object.
+
+
+
+
+ Retrieves the last error generated in the object.
+
+
Opens a grid.
@@ -4173,6 +4220,12 @@
Reference to the first element of the array of floats that will hold the row of values.
True on success.
+
+
+ Gets grid colour scheme object used for rendering of the image representation of the grid, in case
+ the datasource has a color table (GTiff with indexed colors, for example).
+
+
Changes the grid source without closing it.
@@ -4222,6 +4275,21 @@
The index of the cell's row.
The new value as variant data type.
+
+
+ The index of the active band within grid.
+
+ Active band will be used on data extraction operation like Grid.get_Value, Grid.GetFloatWindow
+ and during creation of image proxy.
+ \new490 Added in version 4.9.0
+
+
+
+ Gets the value indicating whether grid source can be displayed by Image class without creation of proxy file.
+
+ Check return value for the reason whey such rendering isn't possible.
+ \new491 Added in version 4.9.1
+
Creates a proxy image file to display grid data.
@@ -4231,6 +4299,12 @@
The format of proxy can be changed in GlobalSettings.GridProxyFormat.
\new491 Added in version 4.9.1
+
+
+ Gets extents of the grid.
+
+ \new490 Added in version 4.9.0
+
Generates colour scheme for the grid.
@@ -4240,6 +4314,30 @@
Generated colour scheme or null if the operation failed.
\new491 Added in version 4.9.1
+
+
+ Gets the value indicating whether grid has a valid image proxy for visualization.
+
+ To be considered valid the proxy must have proper name (with "_proxy" postfix) and colour scheme file (.mwleg).
+ Both this files must have older creation date than the grid source file itself.
+ \new491 Added in version 4.9.1
+
+
+
+ Returns the maximum value stored in the grid.
+
+
+
+
+ Returns the minimum value stored in the grid.
+
+
+
+
+ Gets the number of within the grid.
+
+ \new490 Added in version 4.9.0
+
Opens grid as image.
@@ -4259,6 +4357,13 @@
True on success and false otherwise.
\new490 Added in version 4.9.0
+
+
+ Gets or sets the value indicating how the grid should be displayed.
+
+ This value will be used in AxMap.AddLayer and Grid.OpenAsImage methods.
+ \new491 Added in version 4.9.1
+
Removes proxy image file created for grid display.
@@ -4287,6 +4392,13 @@
Color scheme or null if both retrieval and generation failed.
\new491 Added in version 4.9.1
+
+
+ Gets the type of grid source, which defines a) whether any grid source is opened and b) if so, what the inner representation of grid by MapWinGIS.
+
+ The functionality and behaviour of various source types may differ.
+ \new490 Added in version 4.9.0
+
Returns an array with grid values which lie within specified bounds. Double overload of Grid.GetFloatWindow method.
@@ -4349,123 +4461,68 @@
The band or null if index is not valid.
\new494 Added in version 4.9.4
-
+
- Returns the common dialog filter containing all supported file extensions in string format.
+ Gets the active band of the datasource.
+ \new494 Added in version 4.9.4
-
+
- Returns the data type of the values stored in the grid.
+ A grid color break object defines how a specified region of a grid will be colored.
+ Represents a part of the GridColorScheme.
-
+
- The filename associated with the object.
+ Gets or sets the caption to display for the color break
-
+
+
+ Gets or sets the way a break is colored.
+
+
+
The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
\deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
+
- Returns the header of the grid.
+ Gets or sets the model used to color the break.
-
+
- Returns whether the grid is loaded in to RAM memory or not.
+ Gets or sets the color representing the highest value in the color break.
-
+
- The key may be used by the programmer to store any string data associated with the object.
+ Gets or sets the highest value in the color break.
-
+
- Retrieves the last error generated in the object.
+ The key may be used by the programmer to store any string data associated with the object.
-
+
- Gets grid colour scheme object used for rendering of the image representation of the grid, in case
- the datasource has a color table (GTiff with indexed colors, for example).
+ Retrieves the last error generated in the object.
-
+
- The index of the active band within grid.
+ Gets or sets the lowest value in the color break.
- Active band will be used on data extraction operation like Grid.get_Value, Grid.GetFloatWindow
- and during creation of image proxy.
- \new490 Added in version 4.9.0
-
-
- Gets the value indicating whether grid source can be displayed by Image class without creation of proxy file.
-
- Check return value for the reason whey such rendering isn't possible.
- \new491 Added in version 4.9.1
-
-
-
- Gets extents of the grid.
-
- \new490 Added in version 4.9.0
-
-
-
- Gets the value indicating whether grid has a valid image proxy for visualization.
-
- To be considered valid the proxy must have proper name (with "_proxy" postfix) and colour scheme file (.mwleg).
- Both this files must have older creation date than the grid source file itself.
- \new491 Added in version 4.9.1
-
-
-
- Returns the maximum value stored in the grid.
-
-
-
-
- Returns the minimum value stored in the grid.
-
-
-
-
- Gets the number of within the grid.
-
- \new490 Added in version 4.9.0
-
-
-
- Gets or sets the value indicating how the grid should be displayed.
-
- This value will be used in AxMap.AddLayer and Grid.OpenAsImage methods.
- \new491 Added in version 4.9.1
-
-
-
- Gets the type of grid source, which defines a) whether any grid source is opened and b) if so, what the inner representation of grid by MapWinGIS.
-
- The functionality and behaviour of various source types may differ.
- \new490 Added in version 4.9.0
-
-
-
- Gets the active band of the datasource.
-
- \new494 Added in version 4.9.4
-
-
+
- A grid color break object defines how a specified region of a grid will be colored.
+ Gets or sets the lowest value in the color break.
- Represents a part of the GridColorScheme.
@@ -4474,106 +4531,101 @@
The error code for which the error message is required.
The error message description for the specified error code.
-
-
- Gets or sets the caption to display for the color break
-
-
-
+
- Gets or sets the way a break is colored.
+ Gets or sets a value indicating whether the break is visible.
+ \new494 Added in version 4.9.4
-
+
- The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
+ A grid color scheme defines how a grid will be colored.
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+ A grid color scheme may either contain grid color breaks created by
+ the user, or may use a predefined color scheme.
-
+
- Gets or sets the model used to color the break.
+ Gets or sets the intensity of the ambient lighting for the color scheme. Only applies when creating hillshaded breaks.
-
+
- Gets or sets the color representing the highest value in the color break.
+ Clears all color breaks in the color scheme.
-
+
- Gets or sets the highest value in the color break.
+ Deletes the specified color break from the color scheme.
+ The index of the color break to be removed.
-
+
- The key may be used by the programmer to store any string data associated with the object.
+ Restores the setings of the grid from the string generated by Grid.Serialize() method.
+ The string with grid settings.
-
+
- Retrieves the last error generated in the object.
+ Gets the direction the light source is pointing for the color scheme in the form of a vector which originates from the light
+ source. This only applies to hillshaded breaks.
+ The direction the light source is pointing represented by a vector.
-
+
- Gets or sets the lowest value in the color break.
+ The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
+
- Gets or sets the lowest value in the color break.
+ Inserts a break at the specified position of the color scheme.
+ The position to insert the break at.
+ The grid color break.
-
+
- Gets or sets a value indicating whether the break is visible.
+ Adds a break to the color scheme.
- \new494 Added in version 4.9.4
+ The grid color break.
-
+
- A grid color scheme defines how a grid will be colored.
+ The key may be used by the programmer to store any string data associated with the object.
- A grid color scheme may either contain grid color breaks created by
- the user, or may use a predefined color scheme.
-
+
- Clears all color breaks in the color scheme.
+ Retrieves the last error generated in the object.
-
+
- Deletes the specified color break from the color scheme.
+ Gets the azimuth, or compass heading of the light source. Only applies to hillshaded breaks.
- The index of the color break to be removed.
-
+
- Restores the setings of the grid from the string generated by Grid.Serialize() method.
+ Gets the elevation of the light source. Only applies to hillshaded breaks.
- The string with grid settings.
-
+
- Gets the direction the light source is pointing for the color scheme in the form of a vector which originates from the light
- source. This only applies to hillshaded breaks.
+ Gets or sets the intensity of the light source for the color scheme. Only applies to hillshaded breaks.
- The direction the light source is pointing represented by a vector.
-
+
- Inserts a break at the specified position of the color scheme.
+ The color to use for the color scheme when drawing grid cells with a no-data value.
- The position to insert the break at.
- The grid color break.
-
+
- Adds a break to the color scheme.
+ Gets the number of color breaks in the color scheme.
- The grid color break.
@@ -4654,55 +4706,14 @@
True on suceess.
\new494 Added in version 4.9.4
-
-
- Gets or sets the intensity of the ambient lighting for the color scheme. Only applies when creating hillshaded breaks.
-
-
-
-
- The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
-
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
-
-
- The key may be used by the programmer to store any string data associated with the object.
-
-
-
-
- Retrieves the last error generated in the object.
-
-
-
-
- Gets the azimuth, or compass heading of the light source. Only applies to hillshaded breaks.
-
-
-
-
- Gets the elevation of the light source. Only applies to hillshaded breaks.
-
-
-
-
- Gets or sets the intensity of the light source for the color scheme. Only applies to hillshaded breaks.
-
-
-
-
- The color to use for the color scheme when drawing grid cells with a no-data value.
-
-
-
+
- Gets the number of color breaks in the color scheme.
+ A grid header object is used to hold the information contained in a grid's header
-
+
- A grid header object is used to hold the information contained in a grid's header
+ Gets or sets a text string with information about color table. This value doesn't affect grid processing.
@@ -4711,23 +4722,6 @@
The grid header to copy setting from.
-
-
- Retrieves the error message associated with the specified error code.
-
- The error code for which the error message is required.
- The error message description for the specified error code.
-
-
-
- For inner use only.
-
-
-
-
- Gets or sets a text string with information about color table. This value doesn't affect grid processing.
-
-
Not implemented. Get or sets the geoprojection associated with grid header.
@@ -4795,11 +4789,24 @@
Gets or sets the height of a cell in the grid represented by the grid header.
+
+
+ Retrieves the error message associated with the specified error code.
+
+ The error code for which the error message is required.
+ The error message description for the specified error code.
+
+
+
+ For inner use only.
+
+
Represents an raster image of particular format which may be added to the map.
- \dot digraph image_diagram {
+ \dot
+ digraph image_diagram {
nodesep = 0.3;
ranksep = 0.3;
splines = ortho;
@@ -4843,6 +4850,28 @@
Some properties and methods are applicable to the GDAL images only.\n
+
+ \addtogroup image_gdal GDAL images
+ Here is a list of methods and properties that are specific for images accessed through GDAL library.
+ The properties and methods described here belong to Image class.
+ \dot
+ digraph image_common {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Image" URL="\ref Image"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="GDAL images" URL="\ref image_common"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
+
+ Gets or sets the size of image buffer in percentage.
+
+ The values less than 100 will increase performance of drawing at the cost of decreasing the visual quality.
+
Converts the position of pixel in image buffer to the map coordinates.
@@ -4866,6 +4895,12 @@
True on success and false otherwise.
\new48 Added in version 4.8
+
+
+ Clears the cache of GDAL library which can be used for faster display.
+
+ \new48 Added in version 4.8
+
Loads the whole image in the memory buffer of specified size. Applicable for GDAL images only.
@@ -4876,15 +4911,48 @@
True on successful loading and false otherwise.
\new48 Added in version 4.8
-
+
- Sets no-data value for the image. Applicable for GDAL images only.
+ Returns the number of bands of GDAL image.
- The pixels with this value will be treated as transparent.
- The value to be set.
+
+
+
+ Returns the number of overviews for GDAL image.
+
+ \see Image.BuildOverviews.
+ \new48 Added in version 4.8
+
+
+
+ Gets the type of palette interpretation. Applicable for GDAL images only.
+
+ The possible values are
+ - "Grayscale";
+ - "Red, Green, Blue and Alpha";
+ - "Cyan, Magenta, Yellow and Black";
+ - "Hue, Lightness and Saturation";
+ - "Unknown".
+
+
+
+ Gets or sets a boolean value which indicates whether a histogram will be used. Applicable for GDAL images only.
+
+
+
+
+ Sets no-data value for the image. Applicable for GDAL images only.
+
+ The pixels with this value will be treated as transparent.
+ The value to be set.
A boolean output value which indicates the success of the operation.
\new48 Added in version 4.8
+
+
+ Returns a boolean value which indicates whether an image has a color table. Applicable for GDAL images only.
+
+
Reloads the image buffer to represent the specified map extents. Applicable for GDAL images only.
@@ -4898,6 +4966,49 @@
The number of image pixels which fall into the specified extents.
This parameter is no longer used.
+
+
+ Returns true if the datasource represents RGB image.
+
+ The property can be used to distinguish grid datasource from genuine images.
+ Implementation checks if all 3 R,G,B colors are set as color interpretation for GDAL bands.
+ Any additional bands will be ignored.
+ \new491 Added in version 4.9.1
+
+
+
+ Returns true if the image is warped, i.e. there are rotation parameters in world file.
+
+ \new490 Added in version 4.9.0
+
+
+ \addtogroup image_common Image common
+ Here is a list of methods and properties that are common for all images despite their source.
+ The properties and methods described here belong to Image class.
+ \dot
+ digraph image_management {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Image" URL="\ref Image"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Open and close" URL="\ref image_common"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
+
+ Returns the filename of the datasource for an image.
+
+ For proxy image grid filename will be renamed, in other cases Filename of Image itself.
+ \new491 Added in version 4.9.1
+
+
+
+ Returns the common dialog filter containing all supported file extensions in string format.
+
+
Clears the image using the specified canvas color as the new color for every pixel in the image.
@@ -4929,6 +5040,11 @@
The serialized string generated by Image.Serialize() method.
\new48 Added in version 4.8
+
+
+ The filename associated with the object.
+
+
Opens an image from file.
@@ -4941,6 +5057,16 @@
Optional. The ICallback object which will receive progress and error events while the image is being opened.
A boolean value representing the success or failure of opening the image.
+
+
+ Gets the image object's image type.
+
+
+
+
+ Returns true when the image is loaded in RAM memory, and returns false when the image is not loaded in RAM memory.
+
+
Changes the data source of the image object without the its closing.
@@ -4966,6 +5092,31 @@
The serialized string.
\new48 Added in version 4.8
+
+
+ Gets or sets instance of the labels class associated with the image.
+
+ \new48 Added in version 4.8
+
+
+
+ The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
+
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+
+
+
+ The key may be used by the programmer to store any string data associated with the object.
+
+
+
+
+ The source type of the image.
+
+ Images start with istUninitialized state. After loading bmp images istDiskBased or istInMemory value will be set depending
+ on the value of inMem parameter. For GDAL images istGDALBased will be set.
+ \new48 Added in version 4.8
+
Retrieves the error message associated with the specified error code.
@@ -4973,7 +5124,54 @@
The error code for which the error message is required.
The error message description for the specified error code.
+
+
+ Retrieves the last error generated in the object.
+
+
+
+
+ Gets or sets a boolean value which indicates how images with identical size and position on the map will be drawn.
+
+ When set to true such images will be merged into a single bitmap. This may improve performance
+ in case of low number of data pixels (those which differ from the transparent color). The default value is false.
+ \new48 Added in version 4.8
+
+
+
+ Returns file handle for BMP image. For inner use only.
+
+
+
+
+ Get or sets an instance of GeoProjection class associated with the image.
+
+ The property can't be set to NULL (there is always an instance of GeoProjection class associated with image).
+ \new493 Added in version 4.9.3
+
+
+
+ Returns true if image object is empty, i.e. not bound to some disk-based datasource and doesn't hold any in-memory data.
+ This property is the same as checking Image.SourceType = istUninitialized.
+
+
+ \addtogroup image_position Image position
+ Here is a list of methods and properties which affect position and scale of image, conversion between map units and image coordinates.
+ The properties and methods described here belong to Image class.
+ \dot
+ digraph image_management {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Image" URL="\ref Image"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Position" URL="\ref image_position"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
Retrieves projection string from the associated .prj file.
@@ -4987,6 +5185,16 @@
The projection string.
True on success and false otherwise.
+
+
+ Returns the extents of the image.
+
+
+
+
+ Gets the height of the image in pixels.
+
+
Converts coordinates of image's pixel to the screen coordinates.
@@ -4997,6 +5205,48 @@
The resulting y coordinate of the map.
\new48 Added in version 4.8
+
+
+ Gets or sets the number of map units per image pixel for x axis.
+
+ The changes of this value will result in scaling of the image horizontally.
+ \new48 Added in version 4.8
+
+
+
+ Gets or sets the number of map units per image pixel for y axis.
+
+ The changes of this value will result in scaling of the image vertically.
+ \new48 Added in version 4.8
+
+
+
+ Gets the height of the image.
+
+ This property should be used to return the total height of the image, as compared to the height of the image buffer.
+ The height of the image in pixels.
+ \new48 Added in version 4.8
+
+
+
+ Gets the width of the image.
+
+ This property should be used to return the total width of the image, as compared to the width of the image buffer.
+ The width of the image in pixels.
+ \new48 Added in version 4.8
+
+
+
+ Gets or sets the x coordinate of the center of lower left pixel of the image in map units.
+
+ \new48 Added in version 4.8
+
+
+
+ Gets or sets the y coordinate of the center of lower left pixel of the image in map units.
+
+ \new48 Added in version 4.8
+
Returns the coordinates of pixel in image buffer which correspond to the given point on the map.
@@ -5017,7 +5267,50 @@
The row.
\new48 Added in version 4.8
+
+
+ Gets the width of the image in pixels.
+
+
+
+
+ Gets or sets the x coordinate of the center of the lower-left pixel in the image.
+
+
+
+
+ Gets or sets the y coordinate of the center of the lower-left pixel in the image.
+
+
+
+
+ Gets or sets the number of map units per pixel of image buffer for x axis.
+
+ The set part of the property is not applicable for GDAL images.
+
+
+
+ Gets or sets the number of map units per pixel of image buffer for y axis.
+
+ The set part of the property is not applicable for GDAL images.
+
+ \addtogroup image_visualization Image visualization
+ Here is a list of properties that affect the visualization of the image.
+ The properties and methods described here belong to Image class.
+ \dot
+ digraph image_visualization {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Image" URL="\ref Image"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Visualization" URL="\ref image_visualization"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
Sets transparent color for image.
@@ -5026,37 +5319,98 @@
It also set Image.UseSetTranparencyColor to true.
\new491 Added in version 4.9.1
-
+
- Gets the data from the image and puts it into the selected bitmap in the specified device context.
+ The interpolation mode for images which are displayed with the resolution higher than original, i.e. after zoom in (down).
- This function requires the width and height of the selected bitmap and the image to match.
- Use of this function requires advanced knowledge in windows graphics concepts and is intended for advanced users only.
- The handle to the device context.
- A boolean value representing the success or failure of getting the device context handle for the image.
-
+
- This function uses a bitmap selected in the specified device context handle as the data to copy into the image for which the
- function is called.
- This function requires the image to be the same width and height as the bitmap selected in the device context.
- Use of this function requires advanced knowledge in windows graphics concepts and is intended for advanced users only.
- The device context handle of the device context for which the selected bitmap is to be used to
- copy the bits into the image used to call the function.
- A boolean value representing success or failure of setting the image's bits using the bitmap
- selected in the specified device context.
+ Gets or sets the drawing method of image.
+
+ Was used temporarily while moving from GDI to GDI+ drawing.
+ \deprecated v 4.8. No longer used.
-
+
- Gets a row of pixels from the image.
+ A boolean value which indicates whether an image will be displayed using a gray palette.
- The row of pixels you want to get from the image.
- An array which will return the pixels in the specified row of the image.
- A boolean value representing the success or failure of getting the row of pixels from the image.
-
+
- Returns the arrays with the unique colors of the image and their frequencies.
+ Gets or sets a color which is used as the transparency color for the image.
+
+
+
+
+ Gets or sets a second color which is used as the transparency color for the image.
+
+ All the colors between TransparencyColor and TransparencyColor2 will be transparent.
+ This "between" relation is calculated for each color channel and then the results are combined by AND operation.
+
+
+
+ Gets or sets the value which define alpha component of image colors (0.0-1.0).
+
+ The values range from 0.0(fully transparent) to 1.0(fully opaque).
+
+
+
+ The interpolation mode for images which are displayed with the resolution lower than original, i.e. after zooming out (up).
+
+
+
+
+ Gets or sets whether or not the transparency color is being used when the image is displayed.
+
+
+
+ \addtogroup image_data Data access
+ Here is a list of methods and properties which provide access to the values of pixels.
+ The properties and methods described here belong to Image class.
+ \dot
+ digraph image_data {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Image" URL="\ref Image"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Data access" URL="\ref image_data"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
+
+ Gets the data from the image and puts it into the selected bitmap in the specified device context.
+
+ This function requires the width and height of the selected bitmap and the image to match.
+ Use of this function requires advanced knowledge in windows graphics concepts and is intended for advanced users only.
+ The handle to the device context.
+ A boolean value representing the success or failure of getting the device context handle for the image.
+
+
+
+ This function uses a bitmap selected in the specified device context handle as the data to copy into the image for which the
+ function is called.
+ This function requires the image to be the same width and height as the bitmap selected in the device context.
+ Use of this function requires advanced knowledge in windows graphics concepts and is intended for advanced users only.
+ The device context handle of the device context for which the selected bitmap is to be used to
+ copy the bits into the image used to call the function.
+ A boolean value representing success or failure of setting the image's bits using the bitmap
+ selected in the specified device context.
+
+
+
+ Gets a row of pixels from the image.
+
+ The row of pixels you want to get from the image.
+ An array which will return the pixels in the specified row of the image.
+ A boolean value representing the success or failure of getting the row of pixels from the image.
+
+
+
+ Returns the arrays with the unique colors of the image and their frequencies.
For large images it's recommended to perform the operation with the smaller
size of buffer to improve performance and possible RAM overuse.
@@ -5065,6 +5419,11 @@
The output array of the same size with Colors array with the frequency of the each color.
The number of unique colors.
+
+
+ Gets or sets the picture object.
+
+
Gets the value of a pixel in the image.
@@ -5081,6 +5440,29 @@
The column in the image for which the value is required.
The value of the specified pixel in the image.
+
+
+
+ Gets or sets the color scheme to render image with.
+
+ This property should be used for grid datasources in the first place (when there is no build-in colors).
+ But may also be used for a single band of regular RGB/ARGB images for synthetic colors and hillshading.
+ When no custom color scheme is set, grid rendering is chosen the color scheme from Image.ImageColorScheme will be used.
+ \new491 Added in version 4.9.1
+
+
+
+ Gets the value which indicates whether an image object represents a visualization proxy for another datasource.
+
+ Will return true if the image was opened with Grid.OpenAsImage only. When opened directly the link to the source grid will be lost.
+ \new491 Added in version 4.9.1
+
+
+
+ Returns true if the image is rendered as grid.
+
+ \new491 Added in version 4.9.1
+
Opens the datasource of the image as grid.
@@ -5090,6 +5472,27 @@
otherwise the datasource of image itself.
\new491 Added in version 4.9.1
+
+
+ Gets the name of the source grid in case the image represent a visualization proxy for a grid.
+
+ \new490 Added in version 4.9.0
+
+
+
+ Gets or sets index of band within datasource whose values should be used to apply color scheme.
+
+ Other bands will ignored during display process. This is useful for multiband grids (e.g. NetCDF),
+ but may also be used with RGB images, to set synthetic colors for a single band.
+ \new491 Added in version 4.9.1
+
+
+
+ Indicate whether hillshade algorithm will be used for generation of image representation of the grid.
+
+ The behaviour has changed in v4.9. Now when active it only switches ColoringType from Hillshade to Gradient.
+ In v.4.8. it used to have the same behaviour as Image.AllowExternalColorScheme.
+
Sets color scheme to use in process of generation of the image representation of the grid.
@@ -5097,7 +5500,23 @@
The color scheme.
True on success and false otherwise.
+
+
+ Gets or sets the predefined color scheme for the image. Applicable for GDAL images only.
+
+ The color scheme is used for generation of image representation of the grid.
+
+
+
+ Gets grid color scheme this proxy image was generated with. The method should be called for proxy images only: Image.IsGridProxy = true.
+
+ Color scheme will be read from .mwleg XML file on the disk.
+
+ \addtogroup image_newmembers New members
+ Here is a list of properties and methods added in the version 4.9.4.
+ The properties and methods described here belong to Image class.\n\n
+ @{
Gets the band with the specified index.
@@ -5105,3278 +5524,3367 @@
Raster band.
\new494 Added in version 4.9.4
-
+
- Gets the minimum value for the specified band.
+ Gets the GDAL driver which manages the current datasource.
- Index of the band.
\new494 Added in version 4.9.4
-
+
- Gets the maximum value for the specified band.
+ Gets the active band (the one used for rendering when grid rendering is on).
- Index of the band.
\new494 Added in version 4.9.4
-
+
- Gets the value of the specified pixel including the alpha component.
+ Gets the palette interpretation for the image.
- The row.
- The column.
- 32bit unsigned integer value.
\new494 Added in version 4.9.4
-
+
- Sets the value of the specified pixel including the alpha component.
+ Gets or sets the brightness of the image.
- The row.
- The column.
- The value to set.
\new494 Added in version 4.9.4
-
+
- Clears the overviews for the datasource.
+ Gets or sets the contrast of the image.
\new494 Added in version 4.9.4
-
+
- Sets the band minimum maximum values for the band. Values outside of this range will not be rendered.
+ Gets or sets the saturation of the image.
- Index of the band.
- The minimum.
- The maximum.
- True on success.
\new494 Added in version 4.9.4
-
+
- Calculates the minimum and maximum values for the specified band and caches them for further use.
+ Gets or sets the hue of the image.
- Index of the band.
- True on success.
\new494 Added in version 4.9.4
-
+
- Gets or sets the size of image buffer in percentage.
+ Gets or sets the gamma correction value for the image.
- The values less than 100 will increase performance of drawing at the cost of decreasing the visual quality.
+ \new494 Added in version 4.9.4
-
+
- Clears the cache of GDAL library which can be used for faster display.
+ Gets or sets the colorize intensity.
- \new48 Added in version 4.8
+ \new494 Added in version 4.9.4
-
+
- Returns the number of bands of GDAL image.
+ Gets or sets the color of the colorize.
+ \new494 Added in version 4.9.4
-
+
- Returns the number of overviews for GDAL image.
+ Gets or sets the index of the red band (used when RGB rendering is chosen).
- \see Image.BuildOverviews.
- \new48 Added in version 4.8
+ \new494 Added in version 4.9.4
-
+
- Gets the type of palette interpretation. Applicable for GDAL images only.
+ Gets or sets the index of the green band (used when RGB rendering is chosen).
- The possible values are
- - "Grayscale";
- - "Red, Green, Blue and Alpha";
- - "Cyan, Magenta, Yellow and Black";
- - "Hue, Lightness and Saturation";
- - "Unknown".
+ \new494 Added in version 4.9.4
-
+
- Gets or sets a boolean value which indicates whether a histogram will be used. Applicable for GDAL images only.
+ Gets or sets the index of the blue band (used when RGB rendering is chosen).
+ \new494 Added in version 4.9.4
-
+
- Returns a boolean value which indicates whether an image has a color table. Applicable for GDAL images only.
+ Gets or sets a value indicating whether RGB band mapping will be used.
+ \see RedBandIndex, GreenBandIndex, BlueBandIndex, AlphaBandIndex
+ \new494 Added in version 4.9.4
-
+
- Returns true if the datasource represents RGB image.
+ Gets or sets a value indicating whether the band
+ set by Image.ActiveBandIndex will be used rather then RGB rendering.
- The property can be used to distinguish grid datasource from genuine images.
- Implementation checks if all 3 R,G,B colors are set as color interpretation for GDAL bands.
- Any additional bands will be ignored.
- \new491 Added in version 4.9.1
+ \new494 Added in version 4.9.4
-
+
- Returns true if the image is warped, i.e. there are rotation parameters in world file.
+ Gets or sets the index of the alpha band.
- \new490 Added in version 4.9.0
+ \new494 Added in version 4.9.4
-
+
- Returns the filename of the datasource for an image.
+ Gets or sets a value indicating whether to use active band as an alpha band as well.
- For proxy image grid filename will be renamed, in other cases Filename of Image itself.
- \new491 Added in version 4.9.1
+ \new494 Added in version 4.9.4
-
+
- Returns the common dialog filter containing all supported file extensions in string format.
+ Gets the minimum value for the specified band.
+ Index of the band.
+ \new494 Added in version 4.9.4
-
+
- The filename associated with the object.
+ Gets the maximum value for the specified band.
+ Index of the band.
+ \new494 Added in version 4.9.4
-
+
- Gets the image object's image type.
+ Gets or sets a value indicating whether colors should be reversed during gray scale rendering (i.e. the smallest values are white).
+ \new494 Added in version 4.9.4
-
+
- Returns true when the image is loaded in RAM memory, and returns false when the image is not loaded in RAM memory.
+ Gets or sets a value indicating whether built-in color table of the image will be ignored.
+ \new494 Added in version 4.9.4
-
+
- Gets or sets instance of the labels class associated with the image.
+ Gets the current rendering mode for the image (depends on the values of other properties).
- \new48 Added in version 4.8
+ \new494 Added in version 4.9.4
-
+
- The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
+ Gets the value of the specified pixel including the alpha component.
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
+ The row.
+ The column.
+ 32bit unsigned integer value.
+ \new494 Added in version 4.9.4
-
+
- The key may be used by the programmer to store any string data associated with the object.
+ Sets the value of the specified pixel including the alpha component.
+ The row.
+ The column.
+ The value to set.
+ \new494 Added in version 4.9.4
-
+
- The source type of the image.
+ Gets the index of the left most pixel of the original image that was included in the current buffer.
- Images start with istUninitialized state. After loading bmp images istDiskBased or istInMemory value will be set depending
- on the value of inMem parameter. For GDAL images istGDALBased will be set.
- \new48 Added in version 4.8
+ \new494 Added in version 4.9.4
-
+
- Retrieves the last error generated in the object.
+ Gets the index of the top most pixel of the original image that was included in the current buffer.
+ \new494 Added in version 4.9.4
-
+
- Gets or sets a boolean value which indicates how images with identical size and position on the map will be drawn.
+ Gets the active color scheme used for the rendering, it may be either default or custom one.
- When set to true such images will be merged into a single bitmap. This may improve performance
- in case of low number of data pixels (those which differ from the transparent color). The default value is false.
- \new48 Added in version 4.8
+ \new494 Added in version 4.9.4
-
+
- Returns file handle for BMP image. For inner use only.
+ Clears the overviews for the datasource.
+ \new494 Added in version 4.9.4
-
+
- Get or sets an instance of GeoProjection class associated with the image.
+ Sets the band minimum maximum values for the band. Values outside of this range will not be rendered.
- The property can't be set to NULL (there is always an instance of GeoProjection class associated with image).
- \new493 Added in version 4.9.3
+ Index of the band.
+ The minimum.
+ The maximum.
+ True on success.
+ \new494 Added in version 4.9.4
-
+
- Returns true if image object is empty, i.e. not bound to some disk-based datasource and doesn't hold any in-memory data.
- This property is the same as checking Image.SourceType = istUninitialized.
+ Calculates the minimum and maximum values for the specified band and caches them for further use.
+ Index of the band.
+ True on success.
+ \new494 Added in version 4.9.4
-
+
+
- Returns the extents of the image.
+ Gets or sets the horizontal and vertical alignment of labels.
-
+
- Gets the height of the image in pixels.
+ Restores the state of the object from the string.
+ A string generated by LabelCategory.Serialize() method.
-
+
- Gets or sets the number of map units per image pixel for x axis.
+ Gets or sets the value which indicates whether the category will be used in the process of shapefile drawing.
- The changes of this value will result in scaling of the image horizontally.
- \new48 Added in version 4.8
-
+
- Gets or sets the number of map units per image pixel for y axis.
+ Gets or sets expression which defines shapes that belong to this category.
- The changes of this value will result in scaling of the image vertically.
- \new48 Added in version 4.8
-
+
- Gets the height of the image.
+ Gets or sets a boolean value which indicates whether font is bold.
- This property should be used to return the total height of the image, as compared to the height of the image buffer.
- The height of the image in pixels.
- \new48 Added in version 4.8
-
+
- Gets the width of the image.
+ Gets or sets font color of labels.
- This property should be used to return the total width of the image, as compared to the width of the image buffer.
- The width of the image in pixels.
- \new48 Added in version 4.8
-
+
- Gets or sets the x coordinate of the center of lower left pixel of the image in map units.
+ Gets or sets the second font color
- \new48 Added in version 4.8
-
+
- Gets or sets the y coordinate of the center of lower left pixel of the image in map units.
+ Gets or sets the gradient for the font of labels.
- \new48 Added in version 4.8
-
+
- Gets the width of the image in pixels.
+ Gets or sets a boolean value which indicates whether font is italic.
-
+
- Gets or sets the x coordinate of the center of the lower-left pixel in the image.
+ Gets or sets font name to draw labels with.
+ The names of fonts or font families like "Arial" should be passed.
-
+
- Gets or sets the y coordinate of the center of the lower-left pixel in the image.
+ Gets or sets the outline color of the font.
+ \see FontOutlineVisible
-
+
- Gets or sets the number of map units per pixel of image buffer for x axis.
+ Gets or sets a boolean value which indicates whether outline of the font is visible.
- The set part of the property is not applicable for GDAL images.
+ \see FontOutlineColor, FontOutlineWidth
-
+
- Gets or sets the number of map units per pixel of image buffer for y axis.
+ Gets or sets the width in pixels of the font outline
- The set part of the property is not applicable for GDAL images.
+ \see FontOutlineVisible
-
+
- The interpolation mode for images which are displayed with the resolution higher than original, i.e. after zoom in (down).
+ Gets or sets the size of the font
-
+
- Gets or sets the drawing method of image.
+ Gets or sets a boolean value which indicates whether font is striked out.
- Was used temporarily while moving from GDI to GDI+ drawing.
- \deprecated v 4.8. No longer used.
-
+
- A boolean value which indicates whether an image will be displayed using a gray palette.
+ Gets or sets the transparency of the font. Values from 0 (opaque) to 255 (transparent) are accepted.
-
+
- Gets or sets a color which is used as the transparency color for the image.
+ Gets or sets a boolean value which indicates whether the font is underlined.
-
+
- Gets or sets a second color which is used as the transparency color for the image.
+ Gets or sets the back color of the frame.
- All the colors between TransparencyColor and TransparencyColor2 will be transparent.
- This "between" relation is calculated for each color channel and then the results are combined by AND operation.
-
+
- Gets or sets the value which define alpha component of image colors (0.0-1.0).
+ Gets or sets the end color of the frame gradient.
- The values range from 0.0(fully transparent) to 1.0(fully opaque).
+ \see FrameGradientMode
-
+
- The interpolation mode for images which are displayed with the resolution lower than original, i.e. after zooming out (up).
+ Gets or sets the gradient mode for the label's frame.
+ Use gmNone value to disable gradient.
-
+
- Gets or sets whether or not the transparency color is being used when the image is displayed.
+ Gets or set the outline color of the label's frame.
-
+
- Gets or sets the picture object.
+ Gets or sets the outline color of the label's frame.
-
-
+
- Gets or sets the color scheme to render image with.
+ Gets or sets the width of the label's frame outline.
- This property should be used for grid datasources in the first place (when there is no build-in colors).
- But may also be used for a single band of regular RGB/ARGB images for synthetic colors and hillshading.
- When no custom color scheme is set, grid rendering is chosen the color scheme from Image.ImageColorScheme will be used.
- \new491 Added in version 4.9.1
-
+
- Gets the value which indicates whether an image object represents a visualization proxy for another datasource.
+ Gets or sets the horizontal distance from text to the border of label's frame
- Will return true if the image was opened with Grid.OpenAsImage only. When opened directly the link to the source grid will be lost.
- \new491 Added in version 4.9.1
-
+
- Returns true if the image is rendered as grid.
+ Gets or sets the vertical distance from text to the border of label's frame
- \new491 Added in version 4.9.1
-
+
- Gets the name of the source grid in case the image represent a visualization proxy for a grid.
+ Gets or sets the transparency of the label's frame. Values from 0 to 255 are accepted.
- \new490 Added in version 4.9.0
-
+
- Gets or sets index of band within datasource whose values should be used to apply color scheme.
+ Gets or sets the shape of the label's frame
- Other bands will ignored during display process. This is useful for multiband grids (e.g. NetCDF),
- but may also be used with RGB images, to set synthetic colors for a single band.
- \new491 Added in version 4.9.1
+
-
+
- Indicate whether hillshade algorithm will be used for generation of image representation of the grid.
+ Gets or sets a boolean value which indicates whether label's frame will be drawn.
- The behaviour has changed in v4.9. Now when active it only switches ColoringType from Hillshade to Gradient.
- In v.4.8. it used to have the same behaviour as Image.AllowExternalColorScheme.
-
+
- Gets or sets the predefined color scheme for the image. Applicable for GDAL images only.
+ Gets or sets the color of the halo around the text of the label.
- The color scheme is used for generation of image representation of the grid.
-
+
- Gets grid color scheme this proxy image was generated with. The method should be called for proxy images only: Image.IsGridProxy = true.
+ Gets or sets the width of the halo around the text of the label.
- Color scheme will be read from .mwleg XML file on the disk.
-
+
- Gets the GDAL driver which manages the current datasource.
+ Gets or sets a boolean value which indicates whether a halo around text will be drawn.
- \new494 Added in version 4.9.4
-
+
- Gets the active band (the one used for rendering when grid rendering is on).
+ Gets or sets the alignment of text within label's frame.
- \new494 Added in version 4.9.4
+ This property is commonly used for the alignment of multi-line labels.
-
+
- Gets the palette interpretation for the image.
+ Gets or sets the orientation of the label relative to the polyline it belongs to.
- \new494 Added in version 4.9.4
-
+
- Gets or sets the brightness of the image.
+ Gets or sets the maximum value for the specified label category in case an LabelCategory.Expression contains a range of values.
- \new494 Added in version 4.9.4
+ The property is used internally.
-
+
- Gets or sets the contrast of the image.
+ Gets or sets the minimum value for the specified label category in case an LabelCategory.Expression contains a range of values.
- \new494 Added in version 4.9.4
+ The property is used internally.
-
+
- Gets or sets the saturation of the image.
+ Gets or sets the name of the category. The names must not be unique.
- \new494 Added in version 4.9.4
-
+
- Gets or sets the hue of the image.
+ Gets or sets the horizontal offset in pixels which is used to draw labels.
- \new494 Added in version 4.9.4
+ When labels are subject to the rotation, "horizontal" means "along text width".
+ \see Labels.AutoOffset property
-
+
- Gets or sets the gamma correction value for the image.
+ Gets or sets the vertical offset in pixels which is used to draw labels.
- \new494 Added in version 4.9.4
+ When labels are subject to the rotation, "vertical" means "along text height".
+ \see Labels.AutoOffset property
-
+
- Gets or sets the colorize intensity.
+ The property isn't implemented.
- \new494 Added in version 4.9.4
-
+
- Gets or sets the color of the colorize.
+ Returns the state of the object in the XML-formatted string.
- \new494 Added in version 4.9.4
+ Use LabelCategory.Deserialize() to restore the state.
+ Serialized string
-
+
- Gets or sets the index of the red band (used when RGB rendering is chosen).
+ Gets or sets a color of shadow for the text of the label.
- \new494 Added in version 4.9.4
+ \see ShadowVisible, ShadowOffsetX, ShadowOffsetY
-
+
- Gets or sets the index of the green band (used when RGB rendering is chosen).
+ Gets or sets the horizontal distance between text of the label and its shadow.
- \new494 Added in version 4.9.4
+ When labels are subject to the rotation, "horizontal" means "along text width"
+ \see ShadowOffsetY, ShadowVisible
-
+
- Gets or sets the index of the blue band (used when RGB rendering is chosen).
+ Gets or sets the horizontal distance between text of the label and its shadow.
- \new494 Added in version 4.9.4
+ When labels are subject to the rotation, "vertical" means "along text height"
+ \see ShadowOffsetX, ShadowVisible
-
+
- Gets or sets a value indicating whether RGB band mapping will be used.
+ Gets or sets a boolean value which indicates whether shadow of the label will be visible.
- \see RedBandIndex, GreenBandIndex, BlueBandIndex, AlphaBandIndex
- \new494 Added in version 4.9.4
+ \see ShadowColor, ShadowOffsetX, ShadowOffsetY
-
+
- Gets or sets a value indicating whether the band
- set by Image.ActiveBandIndex will be used rather then RGB rendering.
+ Gets or sets a boolean value which indicates whether shapes that belongs to the category
+ will be visible.
- \new494 Added in version 4.9.4
-
+
- Gets or sets the index of the alpha band.
+ Gets or sets the maximum font size fo the category.
\new494 Added in version 4.9.4
-
+
- Gets or sets a value indicating whether to use active band as an alpha band as well.
+ Represents a single label on the map.
- \new494 Added in version 4.9.4
+ \dot
+ digraph label_diagram {
+ nodesep = 0.3;
+ ranksep = 0.3;
+ splines = ortho;
+
+ node [shape= "polygon", peripheries = 3, fontname=Helvetica, fontsize=9, color = gray, style = filled, height = 0.2, width = 0.8];
+ lb [ label="Label" URL="\ref Label"];
+
+ node [color = tan, peripheries = 1, height = 0.3, width = 1.0];
+ lbs [ label="Labels" URL="\ref Labels"];
+
+ edge [ dir = "none", arrowhead="open", style = solid, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060", labeldistance = 0.6 ]
+ lbs -> lb [ URL="\ref Labels.get_Label()", tooltip = "Labels.get_Label()", headlabel = " n"];
+ }
+ \enddot
+
+ Graph description\n\n
+ Multipart shapes can have separate labels for every part. Each of such labels is represented by the instance of Label class.
+ Labels added to the map can be accessed via Labels.get_Label() property. It's not recommended to store instances of this class
+ retrieved from the map after the layer they belong to was removed.\n\n
+ This code demonstrate how to move the label for a shape with a given index.
+ \code
+ Shapefile sf = some_shapefile;
+ int shapeIndex = 10; // the index of shape we want to move
+
+ // retrieving label object
+ Label label = sf.Labels.get_Label(shapeIndex, 0); // 0 - the first part
+ if (label != null)
+ {
+ // is it currently displayed on the screen?
+ Debug.Print("The label is drawn: " + label.IsDrawn.ToString());
+
+ label.x += 10.0; // let's move it to the right by 10 map units
+ label.y -= 5.0; // let's move it to the bottom by 5 map units
+ label.Visible = true; // ensure that it's visible
+
+ Debug.Print("The text of the label: " + label.Text);
+ map.Redraw(); // redraw is needed to see the changes of position
+ }
+ else {
+ Debug.Print(string.Format("The chart with index {0} doesn't exists", shapeIndex));
+ }
+ \endcode
+ \new48 Added in version 4.8
-
+
- Gets or sets a value indicating whether colors should be reversed during gray scale rendering (i.e. the smallest values are white).
+ The index of visualization category the label belongs to.
- \new494 Added in version 4.9.4
+ The value -1 indicates that the label doesn't belong to any visualization category and
+ default drawing options specified in the Labels class will be used for it's drawing.
-
+
- Gets or sets a value indicating whether built-in color table of the image will be ignored.
+ Gets a boolean value which indicates whether the label was drawn at the current extents of the map.
- \new494 Added in version 4.9.4
-
+
- Gets the current rendering mode for the image (depends on the values of other properties).
+ Gets or sets the angle of label rotation in degrees. Positive values set
+ clockwise rotation, negative - counter-clockwise.
- \new494 Added in version 4.9.4
-
+
- Gets the index of the left most pixel of the original image that was included in the current buffer.
+ Gets the extents the label occupies on the map (in pixels).
- \new494 Added in version 4.9.4
+ In case the label wasn't drawn on the map, NULL reference will be returned.
-
+
- Gets the index of the top most pixel of the original image that was included in the current buffer.
+ Gets or sets the text of the label.
- \new494 Added in version 4.9.4
-
+
- Gets the active color scheme used for the rendering, it may be either default or custom one.
+ Gets or sets a boolean value which indicates whether the label is visible.
- \new494 Added in version 4.9.4
+ Call AxMap.Redraw() to see the effect of this property.
-
-
+
- Restores the state of the object from the string.
+ Gets or sets the horizontal position of the label in map coordinates.
- A string generated by LabelCategory.Serialize() method.
-
+
- Returns the state of the object in the XML-formatted string.
+ Gets or sets the vertical position of the label in map coordinates.
- Use LabelCategory.Deserialize() to restore the state.
- Serialized string
-
+
- Gets or sets the horizontal and vertical alignment of labels.
+ Represents a list of labels of the map layer and their visualization options.
+ \dot
+ digraph labels_diagram {
+ nodesep = 0.3;
+ ranksep = 0.3;
+ splines = ortho;
+
+ node [shape= "polygon", peripheries = 3, fontname=Helvetica, fontsize=9, color = gray, style = filled, height = 0.2, width = 0.8];
+ lcat [ label="LabelCategory" URL="\ref LabelCategory"];
+ lb [ label="Label" URL="\ref Label"];
+
+ node [color = tan, peripheries = 1, height = 0.3, width = 1.0];
+ lbs [ label="Labels" URL="\ref Labels"];
+
+ node [style = dashed, color = gray];
+ sf [ label="Shapefile" URL="\ref Shapefile"];
+ img [ label="Image" URL="\ref Image"];
+
+ edge [ dir = "none", style = solid, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060", labeldistance = 0.6 ]
+ sf -> lbs [ URL="\ref Shapefile.Labels", tooltip = "Shapefile.Labels", headlabel = " 1"];
+ img -> lbs [ URL="\ref Image.Labels", tooltip = "Image.Labels", headlabel = " 1"];
+ lbs -> lcat [ URL="\ref Labels.get_Category()", tooltip = "Labels.get_Category()", headlabel = " n"];
+ lbs -> lb [ URL="\ref Labels.get_Label()", tooltip = "Labels.get_Label()", headlabel = " n"];
+ }
+ \enddot
+
+ Graph description\n\n
+ Here is a diagram with groups of API members of Labels class.
+ \dotfile labelsgroups.dot
+ Graph description
+ \new48 Added in version 4.8
-
+
- Gets or sets the value which indicates whether the category will be used in the process of shapefile drawing.
+ Gets or sets the global callback object which is used for passing to the client
+ an information about progress and errors.
+ An instance of the class which implements ICallback interface should be passed.
+ The class should be implemented by caller.
+ \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
+
- Gets or sets expression which defines shapes that belong to this category.
+ A text string associated with the instance of the class. Any value can be stored by developer in this property.
-
+
- Gets or sets a boolean value which indicates whether font is bold.
+ Marks that values of size field have changed and the size of labels should be recalculated on the next redraw.
+ \new494 Added in version 4.9.4
-
+
- Gets or sets font color of labels.
+ Gets or sets the maximum font size for labels (when size field is used).
+ \new494 Added in version 4.9.4
-
+
- Gets or sets the second font color
+ Gets or sets a value indicating whether variable size for labels should be used
+ (in the range between Labels.FontSize, Labels.FontSize2).
+ \new494 Added in version 4.9.4
-
+
- Gets or sets the gradient for the font of labels.
+ Gets or sets a value indicating whether logarithmic scale will be used to calculate the size of labels.
+ \see Labels.UseVariableSize
+ \new494 Added in version 4.9.4
-
+
- Gets or sets a boolean value which indicates whether font is italic.
+ Returns the code of the last error which has occurred within the instance of class.
-
+
- Gets or sets font name to draw labels with.
+ Gets the description of the specific error code.
- The names of fonts or font families like "Arial" should be passed.
+ The error code returned by Labels.LastErrorCode.
+ The string with the description.
-
+
- Gets or sets the outline color of the font.
+ Gets or sets the list of visualization options of labels. For inner use only.
- \see FontOutlineVisible
-
+
- Gets or sets a boolean value which indicates whether outline of the font is visible.
+ Gets or sets the values indicating whether GDI+ library should be used to draw labels.
- \see FontOutlineColor, FontOutlineWidth
+ The default value is true. When set to false, GDI will be used for drawing.
+ In GDI mode no gradients and transparency is supported, while in some cases it can be somewhat faster then GDI+.
-
+
- Gets or sets the width in pixels of the font outline
+ Gets a classification field used by unique values classification.
- \see FontOutlineVisible
+ The property is used internally in couple with LabelCategory.MinValue and LabelCategory.MaxValue
+ to avoid the parsing of expressions for the categories in case unique values classification was applied.
-
+
- Gets or sets the size of the font
+ Gets or sets the expression used to generate text of labels from the attribute table of the shapefile.
+ Applicable for the instances of Labels class associated with shapefile (obtained by Shapefile.Labels).
-
+
- Gets or sets a boolean value which indicates whether font is striked out.
+ For labels attached to shapefile layer updates the text of each label based on Expression property.
+ The method is necessary when the values in underlying DBF table have changed,
+ since Labels class doesn't track these changes automatically.
-
+
+
+
- Gets or sets the transparency of the font. Values from 0 (opaque) to 255 (transparent) are accepted.
+ Removes a visualization category with specified index.
+ The index of category to be removed.
+ True on successful removal and false otherwise.
-
+
- Gets or sets a boolean value which indicates whether the font is underlined.
+ Adds a visualization category for labels.
+ Use LabelCategory.Expression or Label.Category to map specific labels to the newly
+ created category.
+ The name of the new category
+ The reference to the new category.
-
+
- Gets or sets the back color of the frame.
+ Maps labels to the visualization categories.
+ LabelCategory.Expression property is analysed.
+ Afterwards Label.Category property is changed for all labels whose attributes comply with the expression.
-
+
- Gets or sets the end color of the frame gradient.
+ Removes all the visualization categories.
- \see FrameGradientMode
-
+
- Gets or sets the gradient mode for the label's frame.
+ Generates visualization categories for labels based on certain field from the attribute
+ table of the parent shapefile.
- Use gmNone value to disable gradient.
+ Use Labels.ApplyCategories to map particular labels to the generated categories based on the
+ LabelCategory.Expression property.
+ The index of field from the attribute table.
+ The type of classification.
+ Number of categories to be generated. It will be ignored for ctUniqueValues.
+ True on successful generation and false otherwise.
-
+
- Gets or set the outline color of the label's frame.
+ Inserts a new visualization category at the given position of the list.
+ The index to insert the new category at. Should be greater or equal to 0 and less then
+ Labels.numCategories.
+ The name of the new category.
+ The reference to the newly created category.
-
+
- Gets or sets the outline color of the label's frame.
+ Moves a specified label category down in the list.
+ The index of the category to move.
+ True on successful operation and false otherwise.
-
+
- Gets or sets the width of the label's frame outline.
+ Moves a specified label category up in the list.
+ The index of the category to move.
+ True on successful operation and false otherwise.
-
+
- Gets or sets the horizontal distance from text to the border of label's frame
+ Number of visualization categories associated with this instance of class.
-
+
- Gets or sets the vertical distance from text to the border of label's frame
+ Applies color scheme to the visualization categories.
+ The method of interpolation.
+ Color scheme to take colors from.
-
+
- Gets or sets the transparency of the label's frame. Values from 0 to 255 are accepted.
+ Applies color scheme to the visualization categories.
+ Allows to choose the part of label to apply colors to.
+ The method of interpolation.
+ Color scheme object to borrow colors from.
+ The element of the label to apply colors to. Labels.ApplyColorScheme is shortcut for using leDefault option.
-
+
- Gets or sets the shape of the label's frame
+ Applies color scheme to the visualization categories.
-
+ The method of interpolation.
+ Color scheme object to borrow colors from.
+ The element of the label to apply colors to. Labels.ApplyColorScheme is shortcut for using leDefault option.
+ The index of the first visualization category to apply colors to.
+ The index of the last visualization category to apply colors to.
-
+
+ \addtogroup labels_management Labels generation
+ Here is a list of properties and methods for adding labels (or their parts) to the map or removing them.
+ This module is a part of the documentation of Labels class.
+ \dot
+ digraph labels_management_graph {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Labels" URL="\ref Labels"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Managemant" URL="\ref labels_management"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
- Gets or sets a boolean value which indicates whether label's frame will be drawn.
+ Adds a new label as the last one in the list.
+ All the parameters passed to the method can be changed afterwards using Labels.get_Label() property.
+ The text of the new label.
+ The x coordinate of the new label.
+ The y coordinate of the new label.
+ The rotation of the label in degrees. Positive values set clockwise rotation, negative - counter-clockwise.
+ The index of visualization category to be used for the label drawing.
+ Default value is -1, which means the default drawing options will be used.
-
+
- Gets or sets the color of the halo around the text of the label.
+ Adds a part to the label with specified index.
+ According to the shapefile specification shapes such as polylines or polygons can have multiple parts.
+ Use this method to add a separate label for each part of the parent shape.
+ The index of label to add a part to.
+ The text to be displayed.
+ The x coordinate of the part.
+ The y coordinate of the part.
+ The rotation of the label's part.
+ The index of visualization category to be used for the label drawing.
+ Default value is -1, which means the default drawing options will be used.
-
+
- Gets or sets the width of the halo around the text of the label.
+ Removes all the labels and parts but not the visualization categories.
-
+
- Gets or sets a boolean value which indicates whether a halo around text will be drawn.
+ Gets the number of labels.
+ Each label can have more then one part.
-
+
- Gets or sets the alignment of text within label's frame.
+ Generates labels for each shape of the parent shapefile.
- This property is commonly used for the alignment of multi-line labels.
+ Applicable for the instances of Labels class associated with shapefile, i.e. returned
+ by Shapefile.Labels property.
+ The expression to be used for generation of the text for labels.
+ The method to calculate position of each label.
+ A value which indicates whether labels should be created for each part of the
+ multipart shape or for the largest part only.
+ The number of generated labels.
-
+
- Gets or sets the orientation of the label relative to the polyline it belongs to.
+ Inserts a new label at the given position.
+ The index to insert the label at.
+ The text of the label.
+ The x coordinate of the label.
+ The y coordinate of the label.
+ The angle of label rotation.
+ The index of the visualization category for the label. Use -1 if the label doesn't belong to any category.
+ True on success and false otherwise.
-
+
- Gets or sets the maximum value for the specified label category in case an LabelCategory.Expression contains a range of values.
+ Inserts a new part for the specified label.
- The property is used internally.
+ %Labels can have several parts which correspond to the parts of shapes they belong to.
+ The index of the label.
+ The index to insert the new part at.
+ The text of the label.
+ The x coordinate of the label.
+ The y coordinate of the label.
+ The rotation of the label in degrees.
+ The index of visualization category. Use -1 if the label doesn't belong to any category.
+ True on success or false otherwise.
-
+
- Gets or sets the minimum value for the specified label category in case an LabelCategory.Expression contains a range of values.
+ Removes a label with the specified index. If the label is multipart then all its parts will be removed.
- The property is used internally.
+ The index of the label to be removed.
+ True on success and false otherwise.
-
+
- Gets or sets the name of the category. The names must not be unique.
+ Removes a part of label with the specified index.
+ The index of the label.
+ The index of part to be removed.
+ True on success and false otherwise.
-
+
- Gets or sets the horizontal offset in pixels which is used to draw labels.
+ Gets or sets a boolean value which indicates whether labels should be synchronized with the parent shapefile.
- When labels are subject to the rotation, "horizontal" means "along text width".
- \see Labels.AutoOffset property
+ Synchronization means that labels will be automatically added or removed simultaneously with
+ the corresponding operation in the shapefile.
+ Labels can be synchronized only if their number is equal to the number of shapes.
+
+ \see Labels.Count, Shapefile.NumShapes
-
+
- Gets or sets the vertical offset in pixels which is used to draw labels.
+ Gets label with the specified index.
- When labels are subject to the rotation, "vertical" means "along text height".
- \see Labels.AutoOffset property
+ The index of label to return.
+ The part of the label to return. In case of single part labels 0 should be used.
+ A reference to the label or null reference in case of incorrect index.
-
+
- The property isn't implemented.
+ Gets the number of parts for the label with specified index.
+ The index of the label.
+ The number of parts or -1 in case of incorrect index
-
+
+ \addtogroup labels_positioning Labels positioning
+ Here is a list of properties and methods which affects alignment, positioning and scale of labels. This module is a part of the documentation of Labels class.
+ \dot
+ digraph labels_positioning {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Labels" URL="\ref Labels"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Positioning" URL="\ref labels_positioning"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
- Gets or sets a color of shadow for the text of the label.
+ Map scale for which the size of labels will be equal to value set in Labels.FontSize property.
- \see ShadowVisible, ShadowOffsetX, ShadowOffsetY
+ Applicable only when Label.Scale is set to true.
-
+
- Gets or sets the horizontal distance between text of the label and its shadow.
+ Gets or sets the value which indicates whether the labels will change their size depending upon map scale. The default value is false.
- When labels are subject to the rotation, "horizontal" means "along text width"
- \see ShadowOffsetY, ShadowVisible
+ \see Labels.BasicScale
-
+
- Gets or sets the horizontal distance between text of the label and its shadow.
+ Gets or sets the value which affects the sequence of labels drawing relative to the map layers.
- When labels are subject to the rotation, "vertical" means "along text height"
- \see ShadowOffsetX, ShadowVisible
+ See details in the description of tkVerticalPosition enumeration.
-
+
- Gets or sets a boolean value which indicates whether shadow of the label will be visible.
+ Returns the indices of all labels which are displayed in the given part of the map.
- \see ShadowColor, ShadowOffsetX, ShadowOffsetY
-
-
-
- Gets or sets a boolean value which indicates whether shapes that belongs to the category
- will be visible.
+ This property doesn't change appearance of the labels.
+ The bounding box in screen coordinates.
+ The selection tolerance.
+ The selection mode.
+ An output array with indices of the labels.
+ An output array with indices of parts for each label.
+ True in case at least one label fell into selection.
+
+
+
+ Gets or sets the method of label positioning.
-
+
- Gets or sets the maximum font size fo the category.
+ Gets or sets the type of the label's orientation relative to the direction of the labelled shape.
- \new494 Added in version 4.9.4
+ Applicable for the instance of the Labels class associated with polyline shapefiles,
+ i.e. obtained by Shapefile.Labels property while Shapefile.ShapefileType is polyline.
-
+
- Represents a single label on the map.
+ Gets or sets the horizontal offset in pixels which is used to draw labels.
+
+ When labels are subject to the rotation, "horizontal" means "along the text width".
+ \see Labels.AutoOffset property
+
+
+
+ Gets or sets the vertical offset in pixels which is used to draw labels.
+
+ When labels are subject to rotation "vertical" means "along the text height".
+ \see Labels.AutoOffset property
+
+
+
+ Gets or sets the value which defines an alignment of text within label's frame.
+
+ Should be used with multiline labels.
+
+
+
+ Turns on or off the auto offset behaviour.
+
+
+ When set to true, Labels.OffsetX and Labels.OffsetY property will be changed
+ automatically according to the size of symbols for parent shape points to avoid overlaps.
+ Applicable for point and multipoint shapefiles only.
+
+
+
+
+ Sets horizontal and vertical alignment of labels.
+
+
+ \addtogroup labels_serialization Labels serialization
+ Here is a list of methods and properties for serialization of labels and their persistence between the runs of application.
+ This module is a part of the documentation of Labels class.
\dot
- digraph label_diagram {
- nodesep = 0.3;
- ranksep = 0.3;
- splines = ortho;
-
- node [shape= "polygon", peripheries = 3, fontname=Helvetica, fontsize=9, color = gray, style = filled, height = 0.2, width = 0.8];
- lb [ label="Label" URL="\ref Label"];
-
- node [color = tan, peripheries = 1, height = 0.3, width = 1.0];
- lbs [ label="Labels" URL="\ref Labels"];
-
- edge [ dir = "none", arrowhead="open", style = solid, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060", labeldistance = 0.6 ]
- lbs -> lb [ URL="\ref Labels.get_Label()", tooltip = "Labels.get_Label()", headlabel = " n"];
+ digraph labels_serialization {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Labels" URL="\ref Labels"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Serialization" URL="\ref labels_serialization"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
}
\enddot
-
Graph description\n\n
- Multipart shapes can have separate labels for every part. Each of such labels is represented by the instance of Label class.
- Labels added to the map can be accessed via Labels.get_Label() property. It's not recommended to store instances of this class
- retrieved from the map after the layer they belong to was removed.\n\n
- This code demonstrate how to move the label for a shape with a given index.
- \code
- Shapefile sf = some_shapefile;
- int shapeIndex = 10; // the index of shape we want to move
-
- // retrieving label object
- Label label = sf.Labels.get_Label(shapeIndex, 0); // 0 - the first part
- if (label != null)
- {
- // is it currently displayed on the screen?
- Debug.Print("The label is drawn: " + label.IsDrawn.ToString());
-
- label.x += 10.0; // let's move it to the right by 10 map units
- label.y -= 5.0; // let's move it to the bottom by 5 map units
- label.Visible = true; // ensure that it's visible
-
- Debug.Print("The text of the label: " + label.Text);
- map.Redraw(); // redraw is needed to see the changes of position
- }
- else {
- Debug.Print(string.Format("The chart with index {0} doesn't exists", shapeIndex));
- }
- \endcode
- \new48 Added in version 4.8
-
-
+ It's possible to serialize different types of information for labels (charts):\n
+ -# The drawing settings, such visualization options, order of drawing, etc. It's desirable to save them in virtually any scenario.\n\n
+ -# The positions of the labels (charts). It makes sense to save them to avoid the recalculation of the positions on the next loading.
+ It's quite relevant even for middle sized datasets if the more or less complex routine for positioning is used
+ (Shape.Centroid, Shape.InteriorPoint).\n\n
+ -# The angles rotation, text and categories for labels. This type of information requires serialization less often. The text of labels
+ can be easily restored by applying Labels.Expression. Unless the Label.Text property was set manually.
+ In the same way categories rely on LabelCategory.Expression and will be serialized among the first group of settings,
+ unless Label.Category property was set manually. Finally the rotation of labels which is preserved less often.
+ .
+ The first group of settings is embedded in the larger XML body, either layer or map settings. It can be saved:
+ - to the file (see AxMap.SaveLayerOptions, AxMap.SaveMapState);
+ - returned as a string (see AxMap.SerializeLayer, AxMap.SerializeMapState).
+ .
+ For data described in the 2nd and 3rd sections more options are available by Labels.SavingMode property and tkSavingMode enumeration. It can be:
+ - not serialized at all (modeNone);
+ - embedded in the layer or map settings in the same way as the first group (modeStandard);
+ - written to stand-alone XML file with the name [LayerName].lbl (modeXML, modeXMLOverwrite);
+ - written to the dbf table of the shapefile (modeDBF).
+ .
+ @{
- The index of visualization category the label belongs to.
+ Saves position and text of the labels to the attribute table (dbf file).
- The value -1 indicates that the label doesn't belong to any visualization category and
- default drawing options specified in the Labels class will be used for it's drawing.
+ A value which indicates whether the text of labels will be saved.
+ A value which indicates whether the mapping between labels
+ and visualization categories will be saved.
+ True on success and false otherwise.
-
+
- Gets a boolean value which indicates whether the label was drawn at the current extents of the map.
+ Saves positions and text of the labels to the attribute table (dbf file).
+ This method allows to specify the names of fields to save the data in.
+ The name of field to store x coordinate.
+ The name of field to store y coordinate.
+ The name of field to store angle.
+ The name of field to store text.
+ The name of field to store category.
+ A value which indicates whether the text of labels will be saved.
+ A value which indicates whether the mapping between labels and visualization categories will be saved.
+ True on success and false otherwise.
-
+
- Gets or sets the angle of label rotation in degrees. Positive values set
- clockwise rotation, negative - counter-clockwise.
+ Saves the text, positions and visualization options of the labels to the XML file.
+ The name of the file to save the settings to.
+ True on successful saving and false otherwise.
+ Use Labels.get_ErrorMsg() to find out the reason of failure.
-
+
- Gets the extents the label occupies on the map (in pixels).
+ Gets or sets the method to save and restore the state labels.
- In case the label wasn't drawn on the map, NULL reference will be returned.
+ See details in tkSavingMode enumeration.
-
+
- Gets or sets the text of the label.
+ Loads text and position of labels from the attribute table of the parent shapefile.
+ Applicable for the instance of the Labels class associated with polyline shapefiles,
+ i.e. obtained by Shapefile.Labels property
+ A value which indicates whether the text of the labels should be loaded.
+ A value which indicates whether the mapping between labels and visualization categories should be restored.
+ True on successful loading and false otherwise.
-
+
- Gets or sets a boolean value which indicates whether the label is visible.
+ Loads text and position of labels from the attribute table of the parent shapefile.
- Call AxMap.Redraw() to see the effect of this property.
+ The name of field which holds x values.
+ The name of field which holds y values.
+ The name of field which holds rotation angles.
+ The name of the field which stores text of the labels.
+ The name of the field which stores index of visualization category for each label.
+ A value which indicates whether the text of the labels should be loaded.
+ A value which indicates whether the mapping between labels and visualization categories should be restored.
+ True on successful loading and false otherwise.
-
+
- Gets or sets the horizontal position of the label in map coordinates.
+ Restores the state of the labels from the specified XML file.
+ The name of the file previously generated by Labels.SaveToXML method.
+ True on successful loading and false otherwise.
-
+
- Gets or sets the vertical position of the label in map coordinates.
+ Saves the state of the labels.
+ Serialized state holds information about visualization options, categories and text expressions. \n\n
+ Optionally it can hold information about position and text of labels (see Labels.SavingMode property).
+ The default values of the properties will not be serialized.
+ A string with serialized state. On failure an empty string will be returned.
-
+
- Represents a list of labels of the map layer and their visualization options.
+ Restores the state of the Labels class from the string.
+ A string with serialized state generated by Labels.Serialize() method.
+
+
+ \addtogroup labels_visibility Labels visibility
+ Here is list of properties and methods which affect visibility of labels. This module is a part of the documentation of Labels class.
\dot
- digraph labels_diagram {
- nodesep = 0.3;
- ranksep = 0.3;
- splines = ortho;
-
- node [shape= "polygon", peripheries = 3, fontname=Helvetica, fontsize=9, color = gray, style = filled, height = 0.2, width = 0.8];
- lcat [ label="LabelCategory" URL="\ref LabelCategory"];
- lb [ label="Label" URL="\ref Label"];
-
- node [color = tan, peripheries = 1, height = 0.3, width = 1.0];
- lbs [ label="Labels" URL="\ref Labels"];
-
- node [style = dashed, color = gray];
- sf [ label="Shapefile" URL="\ref Shapefile"];
- img [ label="Image" URL="\ref Image"];
-
- edge [ dir = "none", style = solid, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060", labeldistance = 0.6 ]
- sf -> lbs [ URL="\ref Shapefile.Labels", tooltip = "Shapefile.Labels", headlabel = " 1"];
- img -> lbs [ URL="\ref Image.Labels", tooltip = "Image.Labels", headlabel = " 1"];
- lbs -> lcat [ URL="\ref Labels.get_Category()", tooltip = "Labels.get_Category()", headlabel = " n"];
- lbs -> lb [ URL="\ref Labels.get_Label()", tooltip = "Labels.get_Label()", headlabel = " n"];
+ digraph labels_visibility {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Labels" URL="\ref Labels"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Visibility" URL="\ref labels_visibility"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
}
\enddot
-
- Graph description\n\n
- Here is a diagram with groups of API members of Labels class.
- \dotfile labelsgroups.dot
Graph description
- \new48 Added in version 4.8
-
-
+ @{
- Marks that values of size field have changed and the size of labels should be recalculated on the next redraw.
+ Gets or sets the value which indicates whether the labels will be visible on the map.
- \new494 Added in version 4.9.4
-
+
- Gets the description of the specific error code.
+ Gets or sets an expression which defines what shapes should be labelled on the map.
- The error code returned by Labels.LastErrorCode.
- The string with the description.
+ Applicable only to the instances of the Labels class associated with shapefile, i.e.
+ obtained by Shapefile.Labels property.
+ \code
+ Labels lb = new Labels();
+ lb.VisibilityExpression = "[Area] > 100 and [population] > 100000";
+ \endcode
-
+
- For labels attached to shapefile layer updates the text of each label based on Expression property.
+ Is not implemented.
- The method is necessary when the values in underlying DBF table have changed,
- since Labels class doesn't track these changes automatically.
-
+
- Gets the visualization category (LabelCategory) with the specified index.
+ Gets or sets the value which indicates whether labels with the same text should be drawn.
- The index of the category to get.
- The reference to the category or null in case of the incorrect index.
+ When set to true only the labels with unique text will be drawn on map. The choice of label
+ to draw depends on their position in the list and the fact of belonging to the visualization category.
-
-
+
- Removes a visualization category with specified index.
+ Gets or sets the maximum scale at which labels are visible on the map.
- The index of category to be removed.
- True on successful removal and false otherwise.
+ \see Labels.DynamicVisibility, AxMap.CurrentScale
-
+
- Adds a visualization category for labels.
+ Gets or sets the minimum size of the shape in pixels to be labelled at the current map scale.
- Use LabelCategory.Expression or Label.Category to map specific labels to the newly
- created category.
- The name of the new category
- The reference to the new category.
-
+
- Maps labels to the visualization categories.
+ Get or sets the minimum scale at which labels are visible on the map.
- LabelCategory.Expression property is analysed.
- Afterwards Label.Category property is changed for all labels whose attributes comply with the expression.
+ \see Labels.DynamicVisibility, AxMap.CurrentScale
-
+
- Removes all the visualization categories.
+ Gets or sets the minimum zoom at which labels are visible on the map.
-
+
- Generates visualization categories for labels based on certain field from the attribute
- table of the parent shapefile.
+ Gets or sets the maximum zoom at which labels are visible on the map.
- Use Labels.ApplyCategories to map particular labels to the generated categories based on the
- LabelCategory.Expression property.
- The index of field from the attribute table.
- The type of classification.
- Number of categories to be generated. It will be ignored for ctUniqueValues.
- True on successful generation and false otherwise.
-
+
- Inserts a new visualization category at the given position of the list.
+ Gets or sets the value which affects the collision avoidance routine.
+ Two labels are considered overlapping when the distance between their bounding rectangles
+ is less then this value.
- The index to insert the new category at. Should be greater or equal to 0 and less then
- Labels.numCategories.
- The name of the new category.
- The reference to the newly created category.
+ \see Labels.AvoidCollisions
-
+
- Moves a specified label category down in the list.
+ Gets or sets the value which turns the dynamic visibility on or off.
- The index of the category to move.
- True on successful operation and false otherwise.
+
+ When set to true, labels will be visible only in the range of scales set by Labels.MinVisibleScale and Labels.MinVisibleScale.
+
-
+
- Moves a specified label category up in the list.
+ Gets or sets the value which indicates whether a routine for preventing of label overlaps will be used.
- The index of the category to move.
- True on successful operation and false otherwise.
+ When set to true overlapping labels won't be drawn.
-
+
+ \addtogroup labels_visualization Labels visualization
+ Here is the list of visualization properties for labels. This module is a part of the documentation of Labels class.\n\n
+ The more details on the topic in the description of the LabelCategory class. The properties listed below are used for all labels
+ without specific visualization category set, i.e. Label.Category == -1;
+ \dot
+ digraph labels_visualization {
+ splines = true;
+ node [shape= "polygon", fontname=Helvetica, fontsize=9, style = filled, color = palegreen, height = 0.3, width = 1.2];
+ lb [ label="Labels" URL="\ref Labels"];
+ node [shape = "ellipse", color = khaki, width = 0.2, height = 0.2, style = filled]
+ gr [label="Visualization" URL="\ref labels_visualization"];
+ edge [ arrowhead="open", style = solid, arrowsize = 0.6, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060" ]
+ lb -> gr;
+ }
+ \enddot
+ Graph description
+ @{
- Applies color scheme to the visualization categories.
+ Gets or sets the color of the label's shadow.
- The method of interpolation.
- Color scheme to take colors from.
+ \see ShadowVisible
-
+
- Applies color scheme to the visualization categories.
+ Gets or sets the horizontal offset of the label's shadow.
- Allows to choose the part of label to apply colors to.
- The method of interpolation.
- Color scheme object to borrow colors from.
- The element of the label to apply colors to. Labels.ApplyColorScheme is shortcut for using leDefault option.
+ \see ShadowVisible
-
+
- Applies color scheme to the visualization categories.
+ Gets or sets the vertical offset of the label's shadow.
- The method of interpolation.
- Color scheme object to borrow colors from.
- The element of the label to apply colors to. Labels.ApplyColorScheme is shortcut for using leDefault option.
- The index of the first visualization category to apply colors to.
- The index of the last visualization category to apply colors to.
+ \see ShadowVisible
-
+
- Adds a new label as the last one in the list.
+ Gets or sets the value which indicates whether label's shadow is visible.
- All the parameters passed to the method can be changed afterwards using Labels.get_Label() property.
- The text of the new label.
- The x coordinate of the new label.
- The y coordinate of the new label.
- The rotation of the label in degrees. Positive values set clockwise rotation, negative - counter-clockwise.
- The index of visualization category to be used for the label drawing.
- Default value is -1, which means the default drawing options will be used.
-
+
- Adds a part to the label with specified index.
+ Gets or sets the color of the halo around label's text.
- According to the shapefile specification shapes such as polylines or polygons can have multiple parts.
- Use this method to add a separate label for each part of the parent shape.
- The index of label to add a part to.
- The text to be displayed.
- The x coordinate of the part.
- The y coordinate of the part.
- The rotation of the label's part.
- The index of visualization category to be used for the label drawing.
- Default value is -1, which means the default drawing options will be used.
+ \see Labels.HaloVisible
-
+
- Removes all the labels and parts but not the visualization categories.
+ Gets or sets the size of the halo drawn around label's text.
+ \see Labels.HaloVisible
-
+
- Generates labels for each shape of the parent shapefile.
+ Gets or sets the value which indicates whether label's halo is visible.
- Applicable for the instances of Labels class associated with shapefile, i.e. returned
- by Shapefile.Labels property.
- The expression to be used for generation of the text for labels.
- The method to calculate position of each label.
- A value which indicates whether labels should be created for each part of the
- multipart shape or for the largest part only.
- The number of generated labels.
-
+
- Inserts a new label at the given position.
+ Gets or sets the value which indicates whether the font of labels is bold.
- The index to insert the label at.
- The text of the label.
- The x coordinate of the label.
- The y coordinate of the label.
- The angle of label rotation.
- The index of the visualization category for the label. Use -1 if the label doesn't belong to any category.
- True on success and false otherwise.
-
+
- Inserts a new part for the specified label.
+ Gets or sets the color of the label font.
- %Labels can have several parts which correspond to the parts of shapes they belong to.
- The index of the label.
- The index to insert the new part at.
- The text of the label.
- The x coordinate of the label.
- The y coordinate of the label.
- The rotation of the label in degrees.
- The index of visualization category. Use -1 if the label doesn't belong to any category.
- True on success or false otherwise.
-
+
- Removes a label with the specified index. If the label is multipart then all its parts will be removed.
+ Gets or sets the second color of the label font. It is used to set color gradient for the font.
- The index of the label to be removed.
- True on success and false otherwise.
+ \see Labels.FontGradientMode
-
+
- Removes a part of label with the specified index.
+ Gets or sets the gradient mode for the labels.
- The index of the label.
- The index of part to be removed.
- True on success and false otherwise.
+ \see Labels.FontColor2
-
+
- Gets label with the specified index.
+ Gets or sets the value which indicates whether the font of labels is italic.
- The index of label to return.
- The part of the label to return. In case of single part labels 0 should be used.
- A reference to the label or null reference in case of incorrect index.
-
+
- Gets the number of parts for the label with specified index.
+ Gets or sets the name of the font to draw labels with, e.g. Arial.
- The index of the label.
- The number of parts or -1 in case of incorrect index
-
+
- Returns the indices of all labels which are displayed in the given part of the map.
+ Sets the color of the font outline.
- This property doesn't change appearance of the labels.
- The bounding box in screen coordinates.
- The selection tolerance.
- The selection mode.
- An output array with indices of the labels.
- An output array with indices of parts for each label.
- True in case at least one label fell into selection.
+ \see Labels.FontOutlineVisible
-
+
- Saves position and text of the labels to the attribute table (dbf file).
+ Gets or sets the value which indicates whether font outline is visible. The default value is false.
- A value which indicates whether the text of labels will be saved.
- A value which indicates whether the mapping between labels
- and visualization categories will be saved.
- True on success and false otherwise.
-
+
- Saves positions and text of the labels to the attribute table (dbf file).
+ Gets or sets the width of the font outline. The default value is 1.
- This method allows to specify the names of fields to save the data in.
- The name of field to store x coordinate.
- The name of field to store y coordinate.
- The name of field to store angle.
- The name of field to store text.
- The name of field to store category.
- A value which indicates whether the text of labels will be saved.
- A value which indicates whether the mapping between labels and visualization categories will be saved.
- True on success and false otherwise.
+ \see FontOutlineVisible
-
+
- Saves the text, positions and visualization options of the labels to the XML file.
+ Gets or sets the size of the font to draw labels with.
- The name of the file to save the settings to.
- True on successful saving and false otherwise.
- Use Labels.get_ErrorMsg() to find out the reason of failure.
-
+
- Loads text and position of labels from the attribute table of the parent shapefile.
+ Gets or sets the value which indicates whether the font of labels is struck out.
- Applicable for the instance of the Labels class associated with polyline shapefiles,
- i.e. obtained by Shapefile.Labels property
- A value which indicates whether the text of the labels should be loaded.
- A value which indicates whether the mapping between labels and visualization categories should be restored.
- True on successful loading and false otherwise.
-
+
- Loads text and position of labels from the attribute table of the parent shapefile.
+ Gets or sets the transparency of the font. A values between 0 (transparent) to 255 (opaque) can be used.
- The name of field which holds x values.
- The name of field which holds y values.
- The name of field which holds rotation angles.
- The name of the field which stores text of the labels.
- The name of the field which stores index of visualization category for each label.
- A value which indicates whether the text of the labels should be loaded.
- A value which indicates whether the mapping between labels and visualization categories should be restored.
- True on successful loading and false otherwise.
+ The default value is 255. Values which fall outside the specified range will be
+ corrected to the closest acceptable value without reporting an error.
-
+
- Restores the state of the labels from the specified XML file.
+ Gets or sets the value which indicates whether the font of labels is struck out.
- The name of the file previously generated by Labels.SaveToXML method.
- True on successful loading and false otherwise.
-
+
- Saves the state of the labels.
+ Gets or sets the color of the frame's background.
- Serialized state holds information about visualization options, categories and text expressions. \n\n
- Optionally it can hold information about position and text of labels (see Labels.SavingMode property).
- The default values of the properties will not be serialized.
- A string with serialized state. On failure an empty string will be returned.
+
-
+
- Restores the state of the Labels class from the string.
+ Gets or sets the second color of the frame's background.
- A string with serialized state generated by Labels.Serialize() method.
+ , Labels.FrameGradientMode
-
+
- Gets or sets the global callback object which is used for passing to the client
- an information about progress and errors.
-
- An instance of the class which implements ICallback interface should be passed.
- The class should be implemented by caller.
- \deprecated v4.9.3 Use GlobalSettings.ApplicationCallback instead.
-
-
-
- A text string associated with the instance of the class. Any value can be stored by developer in this property.
+ Gets or sets the type of gradient for the frame of the label.
+
+ For all values other than gmNone a gradient
+ starting from Labels.FrameBackColor and ending by Labels.FrameBackColor2 will be applied.
+
-
+
- Gets or sets the maximum font size for labels (when size field is used).
+ Gets or sets the outline color of the label's frame
- \new494 Added in version 4.9.4
+
-
+
- Gets or sets a value indicating whether variable size for labels should be used
- (in the range between Labels.FontSize, Labels.FontSize2).
+ Gets or sets the outline style of the label's frame.
- \new494 Added in version 4.9.4
+
-
+
- Gets or sets a value indicating whether logarithmic scale will be used to calculate the size of labels.
+ Gets or sets the width of the outline of the label's frame.
- \see Labels.UseVariableSize
- \new494 Added in version 4.9.4
+
-
+
- Returns the code of the last error which has occurred within the instance of class.
+ Gets or sets the horizontal distance between the text of the label and its frame.
-
+
- Gets or sets the list of visualization options of labels. For inner use only.
+ Gets or sets the vertical distance between the text of the label and its frame.
-
+
- Gets or sets the values indicating whether GDI+ library should be used to draw labels.
+ Gets or sets the transparency of the label's frame. A values between 0 (transparent) to 255 (opaque) can be used.
- The default value is true. When set to false, GDI will be used for drawing.
- In GDI mode no gradients and transparency is supported, while in some cases it can be somewhat faster then GDI+.
+ The default value is 255. Values which fall outside the specified range will be
+ corrected to the closest acceptable value without reporting an error.
-
+
- Gets a classification field used by unique values classification.
+ Gets or sets the shape of the label's frame.
- The property is used internally in couple with LabelCategory.MinValue and LabelCategory.MaxValue
- to avoid the parsing of expressions for the categories in case unique values classification was applied.
-
+
- Gets or sets the expression used to generate text of labels from the attribute table of the shapefile.
+ Gets or sets the values which indicates whether label's frame is visible.
- Applicable for the instances of Labels class associated with shapefile (obtained by Shapefile.Labels).
-
+
- Number of visualization categories associated with this instance of class.
+ Gets or sets rendering hint to be used during GDI+ rendering.
+ This property will be ignored if GlobalSettings.AutoChooseRenderingHintForLabels is set to true.
-
+
- Gets the number of labels.
+ Gets or sets the formatting to be used for floating point numbers during generation of labels.
- Each label can have more then one part.
+ See acceptable formats in description of C printf function.
+ The commonly used values may be: %g (shortest representation), %.2f (two decimal points).
+ \new493 Added in version 4.9.3
-
+
- Gets or sets a boolean value which indicates whether labels should be synchronized with the parent shapefile.
+ Provides means for defining custom pattern from lines and point symbols for rendering polyline layers.
- Synchronization means that labels will be automatically added or removed simultaneously with
- the corresponding operation in the shapefile.
- Labels can be synchronized only if their number is equal to the number of shapes.
-
- \see Labels.Count, Shapefile.NumShapes
+ The line pattern consists of line segments which can be representing by lines of various style,
+ width and color or by markers. Line segments are drawn one atop of the other in the sequence defined
+ in the line pattern. \n\n
+ Here is a diagram for the LinePattern class.
+ \dot
+ digraph pattern_diagram {
+ nodesep = 0.3;
+ ranksep = 0.3;
+ splines = ortho;
+
+ node [shape= "polygon", peripheries = 3, fontname=Helvetica, fontsize=9, color = gray, style = filled, height = 0.2, width = 0.8];
+ segm [ label="LineSegment" URL="\ref LineSegment"];
+
+ node [color = tan, peripheries = 1, height = 0.3, width = 1.0];
+ ptrn [label="LinePattern" URL="\ref LinePattern"];
+
+ node [style = dashed, color = gray];
+ sdo [ label="ShapeDrawingOptions" URL="\ref ShapeDrawingOptions"];
+
+ edge [ dir = "none", style = solid, fontname = "Arial", fontsize = 9, fontcolor = blue, color = "#606060", labeldistance = 0.6 ]
+ sdo -> ptrn [ URL="\ref ShapeDrawingOptions.LinePattern", tooltip = "ShapeDrawingOptions.LinePattern", headlabel = " 1"];
+ ptrn -> segm [ URL="\ref LinePattern.get_Line()", tooltip = "LinePattern.get_Line()", headlabel = " n"];
+ }
+ \enddot
+ Graph description
+ \new48 Added in version 4.8
-
+
- Map scale for which the size of labels will be equal to value set in Labels.FontSize property.
+ Adds a line segment to the pattern.
- Applicable only when Label.Scale is set to true.
+ The color of the line.
+ The width of the line.
+ The style of the line.
-
+