Functions | Properties
Shapefile selection
Shapefile modules

Functions

bool Shapefile.get_ShapeSelected (int ShapeIndex)
 Gets the state of selection for the specified shape.
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.
bool Shapefile.GetRelatedShapes (int referenceIndex, tkSpatialRelation Relation, ref object resultArray)
 Gets shapes which are located at specified spatial relation to reference shape.
bool Shapefile.GetRelatedShapes2 (Shape referenceShape, tkSpatialRelation Relation, ref object resultArray)
 Gets shapes which are located at specified spatial relation to reference shape.
void Shapefile.InvertSelection ()
 Inverts selection of the shapefile, i.e. selection state of every shape is changed to the opposite value.
void Shapefile.SelectAll ()
 Selects all the shapes in the shapefile.
void Shapefile.SelectNone ()
 Clears selection from all shapes.
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.
void Shapefile.set_ShapeSelected (int ShapeIndex, bool pVal)
 Selects or deselects the specified shape.

Properties

int Shapefile.NumSelected [get]
 Gets the number of selected shapes in the shapefile.
tkSelectionAppearance Shapefile.SelectionAppearance [get, set]
 Gets or sets the way shapefile selection will be displayed.
uint Shapefile.SelectionColor [get, set]
 The colour of the selected shapes.
ShapeDrawingOptions Shapefile.SelectionDrawingOptions [get, set]
 The drawing options used for visualization of the selected shapes.
byte Shapefile.SelectionTransparency [get, set]
 Gets or sets the value which defines the transparency of the selection. Values from 0 (transparent) to 255(opaque) are applicable.

Detailed Description

Here is a list of properties and methods for managing shapefile selection. This module is a part of the documentation of Shapefile class.

dot_inline_dotgraph_32.png

Graph description


Function Documentation

bool Shapefile.get_ShapeSelected ( int  ShapeIndex)

Gets the state of selection for the specified shape.

Parameters:
ShapeIndexThe index of shape
Returns:
True in case the shape is selected and false otherwise.
New API 4.8:
Added in version 4.8
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:
xX coordinate of the point to search from.
yY coordinate of the point to search from.
maxDistanceMaximum distance to search. Use 0 to search at any distance. Passing the max distance can improve performance.
ShapeIndexIndex of shape to which closest vertex belongs.
PointIndexIndex of closest vertex within shape.
DistanceThe 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
bool Shapefile.GetRelatedShapes ( int  referenceIndex,
tkSpatialRelation  Relation,
ref object  resultArray 
)

Gets shapes which are located at specified spatial relation to reference shape.

Parameters:
referenceIndexIndex of reference shape.
RelationSpatial relation. Isn't implemented for Disjoint.
resultArrayThe 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
bool Shapefile.GetRelatedShapes2 ( Shape  referenceShape,
tkSpatialRelation  Relation,
ref object  resultArray 
)

Gets shapes which are located at specified spatial relation to reference shape.

Parameters:
referenceShapeReference shape.
RelationSpatial relation. Isn't implemented for Disjoint.
resultArrayThe 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

Inverts selection of the shapefile, i.e. selection state of every shape is changed to the opposite value.

See also:
Shapefile.get_ShapeSelected
New API 4.8:
Added in version 4.8

Selects all the shapes in the shapefile.

New API 4.8:
Added in version 4.8

Clears selection from all shapes.

New API 4.8:
Added in version 4.8
Examples:
EditAttributes.cs, and SelectBox.cs.
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:
BoundBoxThe bounding rectangular to select shapes within.
ToleranceThe value of tolerance.
SelectModeSelection mode.
ResultAn 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.
void Shapefile.set_ShapeSelected ( int  ShapeIndex,
bool  pVal 
)

Selects or deselects the specified shape.

Parameters:
ShapeIndexThe index of shape to be selected.
pValA value which indicates whether a shape should be selected.
New API 4.8:
Added in version 4.8
Examples:
EditAttributes.cs, and SelectBox.cs.

Properties

Gets the number of selected shapes in the shapefile.

See also:
Shapefile.get_ShapeSelected
New API 4.8:
Added in version 4.8

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
uint Shapefile.SelectionColor [get, set]

The colour of the selected shapes.

It is used when SelectionAppearance is set to saSelectionColor.

New API 4.8:
Added in version 4.8

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

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
 All Classes Files Functions Enumerations Properties Events