#include <core/GeoVectorValue.hpp>
◆ GeoVectorValue() [1/2]
openfluid::core::GeoVectorValue::GeoVectorValue |
( |
| ) |
|
|
delete |
◆ GeoVectorValue() [2/2]
openfluid::core::GeoVectorValue::GeoVectorValue |
( |
const std::string & |
FilePath, |
|
|
const std::string & |
FileName |
|
) |
| |
Creates a new value. For ESRI Shapefile, the FileName
may be the name of a .shp, .shx or .dbf file, or a path to a directory containing proper shape files. It doesn't open the associated OGR datasource.
- Parameters
-
[in] | FilePath | The path of the file(s). |
[in] | FileName | The name or the relative path of the file to open. |
◆ ~GeoVectorValue()
virtual openfluid::core::GeoVectorValue::~GeoVectorValue |
( |
| ) |
|
|
virtual |
Destructor. Closes the open OGR datasource.
◆ containsField()
bool openfluid::core::GeoVectorValue::containsField |
( |
const std::string & |
FieldName, |
|
|
unsigned int |
LayerIndex = 0 |
|
) |
| |
Returns true if a field exists in the LayerIndex layer.
- Parameters
-
[in] | FieldName | The name of the field to query. |
[in] | LayerIndex | The index of the layer to query, default 0. |
- Returns
- True if the field FieldName exists, False otherwise.
- Exceptions
-
◆ data()
Gets the associated opened OGR datasource in read-only access. If the datasource is not already opened, tries to open it first.
- Returns
- The opened OGR datasource.
- Exceptions
-
◆ destroyDataSource()
void openfluid::core::GeoVectorValue::destroyDataSource |
( |
| ) |
|
|
protected |
Destroy the OGRDataSource.
◆ getFieldIndex()
int openfluid::core::GeoVectorValue::getFieldIndex |
( |
const std::string & |
FieldName, |
|
|
unsigned int |
LayerIndex = 0 |
|
) |
| |
Gets the index of a field in the LayerIndex layer.
- Parameters
-
[in] | LayerIndex | The index of the layer to query, default 0. |
[in] | FieldName | The name of the field to query. |
- Returns
- The index of FieldName or -1 if field FieldName doesn't exist.
- Exceptions
-
◆ getGeometryType()
OGRwkbGeometryType openfluid::core::GeoVectorValue::getGeometryType |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Returns the geometry type of the GeoVectorValue.
- Parameters
-
[in] | LayerIndex | The index of the layer to compare the type, default 0. |
- Returns
- an OGRwkbGeometryType
- Exceptions
-
◆ getType()
◆ isFieldOfType()
bool openfluid::core::GeoVectorValue::isFieldOfType |
( |
const std::string & |
FieldName, |
|
|
OGRFieldType |
FieldType, |
|
|
unsigned int |
LayerIndex = 0 |
|
) |
| |
Returns true if a field is of the type FieldType in the LayerIndex layer.
- Parameters
-
[in] | FieldName | The name of the field to query. |
[in] | FieldType | The type of the field to query. |
[in] | LayerIndex | The index of the layer to query, default 0. |
- Returns
- True if the field FieldName is type FieldType.
- Exceptions
-
◆ isLineType()
bool openfluid::core::GeoVectorValue::isLineType |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Returns true if the GeoVectorValue is line type, false otherwise.
- Parameters
-
[in] | LayerIndex | The index of the layer to compare the type, default 0. |
- Returns
- True if the type of the layer LayerIndex is wkbLineString, false otherwise.
- Exceptions
-
◆ isMultiLineType()
bool openfluid::core::GeoVectorValue::isMultiLineType |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Returns true if the GeoVectorValue is MultiLine type, false otherwise.
- Parameters
-
[in] | LayerIndex | The index of the layer to compare the type, default 0. |
- Returns
- True if the type of the layer LayerIndex is wkbMultiLineString, false otherwise.
- Exceptions
-
◆ isMultiPointType()
bool openfluid::core::GeoVectorValue::isMultiPointType |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Returns true if the GeoVectorValue is MultiPoint type, false otherwise.
- Parameters
-
[in] | LayerIndex | The index of the layer to compare the type, default 0. |
- Returns
- True if the type of the layer LayerIndex is wkbMultiPoint, false otherwise.
- Exceptions
-
◆ isMultiPolygonType()
bool openfluid::core::GeoVectorValue::isMultiPolygonType |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Returns true if the GeoVectorValue is MultiPolygon type, false otherwise.
- Parameters
-
[in] | LayerIndex | The index of the layer to compare the type, default 0. |
- Returns
- True if the type of the layer LayerIndex is wkbMultiPolygon, false otherwise.
- Exceptions
-
◆ isPointType()
bool openfluid::core::GeoVectorValue::isPointType |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Returns true if the GeoVectorValue is point type, false otherwise.
- Parameters
-
[in] | LayerIndex | The index of the layer to compare the type, default 0. |
- Returns
- True if the type of the layer LayerIndex is wkbPoint, false otherwise.
- Exceptions
-
◆ isPolygonType()
bool openfluid::core::GeoVectorValue::isPolygonType |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Returns true if the GeoVectorValue is polygon type, false otherwise.
- Parameters
-
[in] | LayerIndex | The index of the layer to compare the type, default 0. |
- Returns
- True if the type of the layer LayerIndex is wkbPolygon, false otherwise.
- Exceptions
-
◆ layer()
OGRLayer* openfluid::core::GeoVectorValue::layer |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Gets a layer of the shape.
- Parameters
-
[in] | LayerIndex | The index of the asked layer, default 0. |
- Returns
- The layer indexed LayerIndex.
- Exceptions
-
◆ layerDef()
OGRFeatureDefn* openfluid::core::GeoVectorValue::layerDef |
( |
unsigned int |
LayerIndex = 0 | ) |
|
Gets the Feature definition of a layer.
- Parameters
-
[in] | LayerIndex | The index of the asked layer definition, default 0. |
- Returns
- The OGR Feature definition of the LayerIndex layer.
- Exceptions
-
◆ tryToOpenSource()
void openfluid::core::GeoVectorValue::tryToOpenSource |
( |
| ) |
|
|
protectedvirtual |
◆ mp_Data
The documentation for this class was generated from the following file: