Functions | |
bool | Shapefile.BeginPointInShapefile () |
Caches the coordinates of shapefile points for faster point in shape test. More... | |
void | Shapefile.EndPointInShapefile () |
Clears the cached data allocated by Shapefile.BeginPointInShapefile. More... | |
int | Shapefile.get_numPoints (int shapeIndex) |
Returns the number of points in the specified shape of the shapefile. More... | |
bool | Shapefile.PointInShape (int shapeIndex, double x, double y) |
Returns boolean value which indicates whether the given point is located within the specified shape. More... | |
int | Shapefile.PointInShapefile (double x, double y) |
Returns a number which indicates the index of shapes within which a test point is situated. More... | |
Extents | Shapefile.QuickExtents (int shapeIndex) |
Returns the extents of the shape with the given index. More... | |
Point | Shapefile.QuickPoint (int shapeIndex, int pointIndex) |
Returns the specified point of shape. More... | |
System.Array | Shapefile.QuickPoints (int shapeIndex, ref int numPoints) |
Returns an array with the coordinates of points of the specified shape. More... | |
bool | Shapefile.RefreshExtents () |
Refreshes extents of all shapes in the shapefile. More... | |
bool | Shapefile.RefreshShapeExtents (int shapeId) |
Refreshes the extents of the particular shape in the shapefile. More... | |
Properties | |
bool | Shapefile.CacheExtents [get, set] |
Gets or sets a boolean value which indicates whether extents of shape will be recalculated before each redraw. More... | |
bool | Shapefile.FastMode [get, set] |
Gets or sets the value which indicates whether fast mode will be used for the shapefile. More... | |
int | Shapefile.MinDrawingSize [get, set] |
Gets or sets the value which affects the drawing of small shapes on the screen. More... | |
Here is a list of properties and methods which doesn't provide additional functionality but can improve the speed of certain operations with shapefile. This module is a part of the documentation of Shapefile class.
bool Shapefile.BeginPointInShapefile | ( | ) |
Caches the coordinates of shapefile points for faster point in shape test.
Shapefile.EndPointInShapefile call is needed to release the memory.
void Shapefile.EndPointInShapefile | ( | ) |
Clears the cached data allocated by Shapefile.BeginPointInShapefile.
int Shapefile.get_numPoints | ( | int | shapeIndex | ) |
Returns the number of points in the specified shape of the shapefile.
This property is more efficient than calling Shapefile.get_Shape().NumPoints.
shapeIndex | The index of the shape. |
There is a confusion with name casing for this property. It's actually spelled 'get_NumPoints' in the source code. However because of the known bug in PIA generation process the property ended up spelled 'get_numPoints' in earlier version of PIAs. After some hesitation we decided to keep it that way. See description of the bug here: http://stackoverflow.com/questions/3179676/c-exposed-property-for-com-in-idl-is-showing-as-lower-case-all-of-a-sudden
bool Shapefile.PointInShape | ( | int | shapeIndex, |
double | x, | ||
double | y | ||
) |
Returns boolean value which indicates whether the given point is located within the specified shape.
The operation is applicable for polygon shapefiles only.
shapeIndex | The index shape (polygon) to perform the test. |
x | X coordinate of the point. |
y | Y coordinate of the point. |
int Shapefile.PointInShapefile | ( | double | x, |
double | y | ||
) |
Returns a number which indicates the index of shapes within which a test point is situated.
Call Shapefile.BeginPointInShapefile to improve performance.
x | The x coordinate of the point. |
y | The y coordinate of the point. |
Extents Shapefile.QuickExtents | ( | int | shapeIndex | ) |
Returns the extents of the shape with the given index.
This operation is faster than Shapefile.get_Shape().Extents as there is no need to read all the shape data.
shapeIndex | The index of the shape. |
Point Shapefile.QuickPoint | ( | int | shapeIndex, |
int | pointIndex | ||
) |
Returns the specified point of shape.
This operation doesn't require the reading of all shape date from disk, therefore it will be faster when editing mode is false.
shapeIndex | The index of shape. |
pointIndex | The point index. |
System.Array Shapefile.QuickPoints | ( | int | shapeIndex, |
ref int | numPoints | ||
) |
Returns an array with the coordinates of points of the specified shape.
The value specified in numPoints will be adjusted if the specified number is greater than the number of points.
shapeIndex | The index of shape. |
numPoints | The number of point to return. |
bool Shapefile.RefreshExtents | ( | ) |
Refreshes extents of all shapes in the shapefile.
See Shapefile.CacheExtents for the details.
bool Shapefile.RefreshShapeExtents | ( | int | shapeId | ) |
Refreshes the extents of the particular shape in the shapefile.
See Shapefile.CacheExtents for the details.
shapeId | The index of the shape which extents are to be refreshed. |
|
getset |
Gets or sets a boolean value which indicates whether extents of shape will be recalculated before each redraw.
When the property is set to:
When Shapefile.FastMode is turned on the extents are cached automatically in spite of this property. Also the extents will be automatically refreshed after Shape.put_XY call. However Shape.get_Point().x = [value] call will not be tracked. Therefore Shapefile.RefreshShapeExtents will still be needed.
To avoid confusion use the following recommendation:
|
getset |
Gets or sets the value which indicates whether fast mode will be used for the shapefile.
The mode ensures faster drawing but makes the client responsible for the refreshing of shapefile extents after editing operation (see Shapefile.RefreshExtents and Shapefile.RefreshShapeExtents). It's highly recommended to use the mode for large shapefiles.
|
getset |
Gets or sets the value which affects the drawing of small shapes on the screen.
The objects with scaled size less than this value will be drawn as a single dot. This can noticeably increase performance for large shapefiles at full scale. But with the increase of speed the quality of drawing will be deteriorating. The default value is 1.