Functions | |
int | Shapefile.EditAddField (string name, FieldType type, int precision, int width) |
Adds a field to the attribute table of the shapefile. The table must be in editing mode. More... | |
bool | Shapefile.EditCellValue (int fieldIndex, int shapeIndex, object newVal) |
Sets the new value for particular cell in attribute table. The table must be in editing mode. More... | |
bool | Shapefile.EditDeleteField (int fieldIndex, ICallback cBack) |
Deletes a field with the specified index from the attribute table. The table must be in editing mode. More... | |
bool | Shapefile.EditInsertField (Field newField, ref int fieldIndex, ICallback cBack) |
Inserts a new field in the shapefile attribute table. The table must be in editing mode. More... | |
object | Shapefile.get_CellValue (int fieldIndex, int shapeIndex) |
Gets the value of the specified field for the shape. More... | |
Field | Shapefile.get_Field (int fieldIndex) |
Gets a specific field stored in the attribute table. More... | |
Field | Shapefile.get_FieldByName (string fieldname) |
Gets specific field stored in the attribute table. More... | |
int | Shapefile.get_FieldIndexByName (string fieldName) |
Gets index of field with specified name. More... | |
bool | Shapefile.HasOgrFidMapping () |
For OGR-derived Shapefiles, indicates whether or not an internal mapping exists from the constant OGR FID value to the currently assigned Shape Index. More... | |
long | Shapefile.OgrFid2ShapeIndex (long OgrFid) |
For OGR-derived Shapefiles, you can use this function to get the Shape Index that is currently associated with the specified OGR FID value (which is constant for each row). More... | |
bool | Shapefile.StartEditingTable (ICallback cBack) |
Opens editing mode for the attribute table. More... | |
bool | Shapefile.StopEditingTable (bool applyChanges, ICallback cBack) |
Closes the editing mode for the attribute table. More... | |
Properties | |
bool | Shapefile.EditingTable [get] |
Gets the value indicating whether editing operations are allowed for shapefile attribute table. More... | |
int | Shapefile.NumFields [get] |
Gets the number of fields in attribute table of the shapefile. More... | |
Table | Shapefile.Table [get] |
Gets the reference to the attribute table associated with the shapefile. More... | |
Here is a list of properties and methods to for interaction with attribute table associated with a shapefile. This module is a part of the documentation of Shapefile class.
int Shapefile.EditAddField | ( | string | name, |
FieldType | type, | ||
int | precision, | ||
int | width | ||
) |
Adds a field to the attribute table of the shapefile. The table must be in editing mode.
name | The name of field. |
type | The type of field. |
precision | The precision of field. |
width | The width of field. |
bool Shapefile.EditCellValue | ( | int | fieldIndex, |
int | shapeIndex, | ||
object | newVal | ||
) |
Sets the new value for particular cell in attribute table. The table must be in editing mode.
fieldIndex | The index of field in attribute table. |
shapeIndex | The index of shape (row number in attribute table). |
newVal | The variant value to be passed (integer, double and string values are accepted depending on field type). |
bool Shapefile.EditDeleteField | ( | int | fieldIndex, |
ICallback | cBack | ||
) |
Deletes a field with the specified index from the attribute table. The table must be in editing mode.
fieldIndex | An index of field to be deleted. |
cBack | An instance of class implementing ICallback interface. It's recommended to pass NULL and use Shapefile.GlobalCallback property instead. |
Inserts a new field in the shapefile attribute table. The table must be in editing mode.
newField | A new instance of field object to insert. |
fieldIndex | A position to insert the new field. An invalid index will be automatically substituted with 0 or Shapefile.NumFields. |
cBack | An instance of class implementing ICallback interface. It's recommended to pass NULL and use Shapefile.GlobalCallback property instead. |
object Shapefile.get_CellValue | ( | int | fieldIndex, |
int | shapeIndex | ||
) |
Gets the value of the specified field for the shape.
The value will be returned as VARIANT data type. When passing to then .NET it will be converted to either integer, double or string data type depending on the type of field.
fieldIndex | The index of field. |
shapeIndex | The index of shape. |
Field Shapefile.get_Field | ( | int | fieldIndex | ) |
Gets a specific field stored in the attribute table.
fieldIndex | The index of the field to be retrieved. |
Field Shapefile.get_FieldByName | ( | string | fieldname | ) |
int Shapefile.get_FieldIndexByName | ( | string | fieldName | ) |
Gets index of field with specified name.
fieldName | Field name. |
bool Shapefile.HasOgrFidMapping | ( | ) |
For OGR-derived Shapefiles, indicates whether or not an internal mapping exists from the constant OGR FID value to the currently assigned Shape Index.
If the associated OGR Layer has an FID field, an internal mapping is built automatically and is available for the purpose of resolving a volatile Shape Index from a fixed FID value. This is because the Shape Index for a given shape is not guaranteed to be the same each time the OGR layer is reloaded. This is particularly true in a multi-user database environment.
long Shapefile.OgrFid2ShapeIndex | ( | long | OgrFid | ) |
For OGR-derived Shapefiles, you can use this function to get the Shape Index that is currently associated with the specified OGR FID value (which is constant for each row).
OgrFid | FID field value from OGR data source |
If the associated OGR Layer has an FID field, an internal mapping is built automatically and is available for the purpose of resolving a volatile Shape Index from a fixed FID value. This is because the Shape Index for a given shape is not guaranteed to be the same each time the OGR layer is reloaded. This is particularly true in a multi-user database environment.
bool Shapefile.StartEditingTable | ( | ICallback | cBack | ) |
Opens editing mode for the attribute table.
cBack | A callback object to report errors and progress information. |
bool Shapefile.StopEditingTable | ( | bool | applyChanges, |
ICallback | cBack | ||
) |
Closes the editing mode for the attribute table.
applyChanges | A boolean value which indicates whether changes made to the memory version of table should be saved to the drive. |
cBack | A callback object to report errors and progress information. |
|
get |
Gets the value indicating whether editing operations are allowed for shapefile attribute table.
Use Shapefile.StartEditingTable and Shapefile.StopEditingTable to control editing mode.
|
get |
Gets the number of fields in attribute table of the shapefile.
|
get |
Gets the reference to the attribute table associated with the shapefile.