Functions | |
| Shapefile | Shapefile.Clone () |
| Creates a copy of the shapefile. | |
| bool | Shapefile.Close () |
| Closes shapefile and releases all the resources. | |
| bool | Shapefile.CreateNew (string ShapefileName, ShpfileType ShapefileType) |
| Initializes in-memory shapefile of the specified type. | |
| bool | Shapefile.CreateNewWithShapeID (string ShapefileName, ShpfileType ShapefileType) |
| Initializes in-memory shapefile of the specified type with unique index field. | |
| bool | Shapefile.Open (string ShapefileName, ICallback cBack) |
| Opens shapefile from the disk. | |
| bool | Shapefile.Resource (string newShpPath) |
| Changes file associated with the current instance of the shapefile class. | |
| bool | Shapefile.Save (ICallback cBack) |
| Saves edits of the in-memory shapefile to the disk without closing editing mode. | |
| bool | Shapefile.SaveAs (string ShapefileName, ICallback cBack) |
| Saves in-memory shapefile to the disk. | |
Here is a list of methods which affect the state of the shapefile. This module is a part of the documentation of Shapefile class.
Creates a copy of the shapefile.
Output shapefile will have the same type, projection and fields of the attribute table, while shapes and the records of the attribute table aren't copied. For complete copy of the shapefile use Shapefile.SelectAll() and Shapefile.ExportSelection().
| bool Shapefile.Close | ( | ) |
Closes shapefile and releases all the resources.
In case shapefile is in editing mode (Shapefile.EditingShapes = true) all the edits will be discarded.
| bool Shapefile.CreateNew | ( | string | ShapefileName, |
| ShpfileType | ShapefileType | ||
| ) |
Initializes in-memory shapefile of the specified type.
Shapefile.EditingShapes property for the new shapefile will be set to true. Any shapefile opened in this instance of class before this call, will be closed without saving the changes.
| ShapefileName | The name of the new shapefile. An empty string should be passed here. |
| ShapefileType | Type of the shapefile to create. |
Use Shapefile.ErrorMsg(Shapefile.LastErrorCode) to find out the reason of failure.
| bool Shapefile.CreateNewWithShapeID | ( | string | ShapefileName, |
| ShpfileType | ShapefileType | ||
| ) |
Initializes in-memory shapefile of the specified type with unique index field.
MWShapeID field will be added to the attribute table. An increasing unique positive integer value will be set in this field for each shape added to the shapefile. The field with MWShapeID name created manually will be treated in the same way.
| ShapefileName | The name of the new shapefile. An empty string should be passed here. |
| ShapefileType | Type of the shapefile to create. |
| bool Shapefile.Open | ( | string | ShapefileName, |
| ICallback | cBack | ||
| ) |
Opens shapefile from the disk.
Any other shapefile currently opened will be closed wihout saving the changes. Shapefile.SourceType property will be set to sstDiskBased.
| ShapefileName | The name of the file to open (.shp extention). |
| cBack | A callback object to report errors and progress information. |
| bool Shapefile.Resource | ( | string | newShpPath | ) |
Changes file associated with the current instance of the shapefile class.
It is equivalent to consequent calling of Shapefile.Close and Shapefile.Open.
| newShpPath | The filename of the new shapefile to be opened. |
| bool Shapefile.Save | ( | ICallback | cBack | ) |
Saves edits of the in-memory shapefile to the disk without closing editing mode.
Applicable only when Shapefile.EditingShapes = true.
| cBack | A callback object to report errors and progress information. |
| bool Shapefile.SaveAs | ( | string | ShapefileName, |
| ICallback | cBack | ||
| ) |
Saves in-memory shapefile to the disk.
| ShapefileName | The name of the file to save data in. |
| cBack | A callback object to report errors and progress information. |
1.7.6.1