|
bool | Shapefile.get_ShapeSelected (int shapeIndex) |
| Gets the state of selection for the specified shape. More...
|
|
bool | Shapefile.GetClosestVertex (double x, double y, double maxDistance, out int shapeIndex, out int pointIndex, out double distance) |
| Gets the vertex closest to the specified point. More...
|
|
bool | Shapefile.GetRelatedShapes (int referenceIndex, tkSpatialRelation relation, ref object resultArray) |
| Gets shapes which are located at specified spatial relation to reference shape. More...
|
|
bool | Shapefile.GetRelatedShapes2 (Shape referenceShape, tkSpatialRelation relation, ref object resultArray) |
| Gets shapes which are located at specified spatial relation to reference shape. More...
|
|
void | Shapefile.InvertSelection () |
| Inverts selection of the shapefile, i.e. selection state of every shape is changed to the opposite value. More...
|
|
void | Shapefile.SelectAll () |
| Selects all the shapes in the shapefile More...
|
|
void | Shapefile.SelectNone () |
| Clears selection from all shapes. More...
|
|
bool | Shapefile.SelectShapes (Extents boundBox, double tolerance, SelectMode selectMode, ref object result) |
| Returns an array with indices of shapes which are located inside specified bounds. More...
|
|
void | Shapefile.set_ShapeSelected (int shapeIndex, bool pVal) |
| Selects or deselects the specified shape. The _DMapEvents.SelectionChanged event is not fired. More...
|
|
Here is a list of properties and methods for managing shapefile selection. This module is a part of the documentation of the Shapefile class.
Historically, using the cmSelection and cmSelectByPolygon tools, you would specify a LayerHandle in the ChooseLayer map event to indicate which single layer you were selecting shapes from. Starting in v5.0, you can select from multiple layers concurrently by setting the 'Selectable' property of each layer you would like to select shapes from. If the LayerHandle returned from the ChooseLayer event is left unspecified (-1), then instead, all layers having the 'Selectable' property = TRUE will be selectable by the tool.
Graph description
◆ get_ShapeSelected()
bool Shapefile.get_ShapeSelected |
( |
int |
shapeIndex | ) |
|
Gets the state of selection for the specified shape.
- Parameters
-
shapeIndex | The index of shape |
- Returns
- True in case the shape is selected and false otherwise.
- New API 4.8:
- Added in version 4.8
◆ GetClosestVertex()
bool Shapefile.GetClosestVertex |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
maxDistance, |
|
|
out int |
shapeIndex, |
|
|
out int |
pointIndex, |
|
|
out double |
distance |
|
) |
| |
Gets the vertex closest to the specified point.
- Parameters
-
x | X coordinate of the point to search from. |
y | Y coordinate of the point to search from. |
maxDistance | Maximum distance to search. Use 0 to search at any distance. Passing the max distance can improve performance. |
shapeIndex | Index of shape to which closest vertex belongs. |
pointIndex | Index of closest vertex within shape. |
distance | The distance to the closest vertex. |
- Returns
- True if the vertex was found within specified distance and false otherwise.
- New API 4.9.0:
- Added in version 4.9.0
◆ GetRelatedShapes()
bool Shapefile.GetRelatedShapes |
( |
int |
referenceIndex, |
|
|
tkSpatialRelation |
relation, |
|
|
ref object |
resultArray |
|
) |
| |
Gets shapes which are located at specified spatial relation to reference shape.
- Parameters
-
referenceIndex | Index of reference shape. |
relation | Spatial relation. Isn't implemented for Disjoint. |
resultArray | The array of indices of the found shapes (int[]) |
- Returns
- True if at least one related shape was found.
- New API 4.9.0:
- Added in version 4.9.0
◆ GetRelatedShapes2()
Gets shapes which are located at specified spatial relation to reference shape.
- Parameters
-
referenceShape | Reference shape. |
relation | Spatial relation. Isn't implemented for Disjoint. |
resultArray | The array of indices of the found shapes (int[]) |
- Returns
- True if at least one related shape was found.
- New API 4.9.0:
- Added in version 4.9.0
◆ InvertSelection()
void Shapefile.InvertSelection |
( |
| ) |
|
◆ SelectAll()
void Shapefile.SelectAll |
( |
| ) |
|
Selects all the shapes in the shapefile
- New API 4.8:
- Added in version 4.8
◆ SelectNone()
void Shapefile.SelectNone |
( |
| ) |
|
◆ SelectShapes()
bool Shapefile.SelectShapes |
( |
Extents |
boundBox, |
|
|
double |
tolerance, |
|
|
SelectMode |
selectMode, |
|
|
ref object |
result |
|
) |
| |
Returns an array with indices of shapes which are located inside specified bounds.
This method doesn't change the state of selection or visualization of shapes.
- Parameters
-
boundBox | The bounding rectangular to select shapes within. |
tolerance | The value of tolerance. |
selectMode | Selection mode. |
result | An output array of long type with the indices of the shapes. |
- Returns
- True in case at least one shape is within bounds and false otherwise.
- Examples
- EditAttributes.cs, RemoveShape.cs, and SelectBox.cs.
◆ set_ShapeSelected()
void Shapefile.set_ShapeSelected |
( |
int |
shapeIndex, |
|
|
bool |
pVal |
|
) |
| |
Selects or deselects the specified shape. The _DMapEvents.SelectionChanged event is not fired.
- Parameters
-
shapeIndex | The index of shape to be selected. |
pVal | A value which indicates whether a shape should be selected. |
- New API 4.8:
- Added in version 4.8
- Examples
- EditAttributes.cs, and SelectBox.cs.
◆ NumSelected
int Shapefile.NumSelected |
|
get |
◆ Selectable
bool Shapefile.Selectable |
|
getset |
Gets or sets a value indicating whether this shapefile will be selectable by the cmSelection and cmSelectByPolygon tool.
This property allows for multiple shapefiles to be concurrently selectable. If only selecting from one layer, you can still use the ChooseLayer map event to specify the selectable layer.
- See also
- AxMap.CursorMode
- New API 5.0:
- Added in version 5.0.0
◆ SelectionAppearance
Gets or sets the way shapefile selection will be displayed.
See MapWinGIS.tkSelectionAppearance for the details.
- New API 4.8:
- Added in version 4.8
◆ SelectionColor
uint Shapefile.SelectionColor |
|
getset |
The colour of the selected shapes.
It is used when SelectionAppearance is set to saSelectionColor.
- New API 4.8:
- Added in version 4.8
◆ SelectionDrawingOptions
The drawing options used for visualization of the selected shapes.
It is used when SelectionAppearance is set to saDrawingOptions.
- New API 4.8:
- Added in version 4.8
◆ SelectionTransparency
byte Shapefile.SelectionTransparency |
|
getset |
Gets or sets the value which defines the transparency of the selection. Values from 0 (transparent) to 255(opaque) are applicable.
- New API 4.8:
- Added in version 4.8