Geo::GDAL
2.2
|
A collection of non-spatial and spatial attributes. More...
Public Member Functions | |
public Geo::OGR::Feature | Clone () |
public method | DumpReadable () |
public scalar | Equal (scalar feature) |
public scalar | FID (scalar id) |
Get or set the id of this feature. | |
public method | Field (scalar name, scalar value,...) |
Get, set, or unset the field value. | |
public method | FillUnsetWithDefault () |
public method | Geometry (scalar name, scalar geometry) |
Get or set the value of a geometry field. | |
public Geo::OGR::FeatureDefn | GetDefn () |
public scalar | GetFID () |
public list | GetField (scalar name) |
public scalar | GetFieldDefn (scalar name) |
public list | GetFieldNames () |
public scalar | GetGeomFieldDefn (scalar name) |
public method | GetNativeData () |
public method | GetNativeMediaType () |
public hash reference | GetSchema () |
Get the schema of this feature. | |
public scalar | GetStyleString () |
public method | IsFieldNull () |
public method | IsFieldSetAndNotNull () |
public Geo::OGR::Layer | Layer () |
public method | RELEASE_PARENT () |
public hash reference | Row (hash row) |
public method | SetFID (scalar id) |
public method | SetField (scalar name, array Value) |
public method | SetFieldNull () |
public method | SetFrom (scalar other, scalar forgiving=1, hashref map) |
public method | SetNativeData () |
public method | SetNativeMediaType () |
public method | SetStyleString (scalar string) |
public list | Tuple (array tuple) |
public scalar | Validate (list flags) |
public Geo::OGR::Feature | new (hash schema) |
Create a new feature. | |
Public Member Functions inherited from Geo::OGR | |
public list | ByteOrders () |
public Geo::GDAL::Driver | Driver (scalar name) |
public list | DriverNames () |
public list | Drivers () |
public method | Flatten () |
public scalar | GeometryTypeModify (scalar type, scalar modifier) |
public scalar | GeometryTypeTest (scalar type, scalar test, scalar type2) |
public list | GeometryTypes () |
public method | GetNonLinearGeometriesEnabledFlag () |
public method | GetOpenDSCount () |
public method | HasM () |
public method | HasZ () |
public Geo::GDAL::Dataset | Open (scalar name, scalar update=0) |
public Geo::GDAL::Dataset | OpenShared (scalar name, scalar update=0) |
public method | SetGenerate_DB2_V72_BYTE_ORDER (scalar Generate_DB2_V72_BYTE_ORDER) |
public method | SetNonLinearGeometriesEnabledFlag () |
A collection of non-spatial and spatial attributes.
A feature is a collection of non-spatial and spatial attributes and an id, which is a special attribute, and data records according to this data model. Attributes are called fields and some fields are spatial, i.e., their value is a geometry. Fields have at least a name and a type. Features may exist within a layer or separetely. The data model of a feature is a definition object.
public Geo::OGR::Feature Geo::OGR::Feature::Clone | ( | ) |
public method Geo::OGR::Feature::DumpReadable | ( | ) |
Object method. Write the contents of this feature to stdout.
public scalar Geo::OGR::Feature::Equal | ( | scalar | feature | ) |
Object method.
feature | a Geo::OGR::Feature object for comparison |
public scalar Geo::OGR::Feature::FID | ( | scalar | id | ) |
Get or set the id of this feature.
Object method.
id | [optional] the id to set for this feature. |
public method Geo::OGR::Feature::Field | ( | scalar | name, |
scalar | value, | ||
... | |||
) |
Get, set, or unset the field value.
Object method.
name | the name (or the index) of the field. |
value | a scalar, a list of scalars or a reference to a list. If undef, the field is unset. If a scalar or a list of scalars, the field is set from them. |
public method Geo::OGR::Feature::FillUnsetWithDefault | ( | ) |
public method Geo::OGR::Feature::Geometry | ( | scalar | name, |
scalar | geometry | ||
) |
Get or set the value of a geometry field.
Object method.
Set or get the geometry in the feature. When setting, does a check against the schema (GeometryType) of the feature. If the parameter is a geometry object, it is cloned.
name | [optional] the name of the spatial field, whose geometry is to be set. If not given, sets or gets the geometry of the first (or the single) spatial field. |
geometry | [optional] a Geo::OGR::Geometry object or a reference to a hash from which such can be created (using Geo::OGR::Geometry::new). |
public Geo::OGR::FeatureDefn Geo::OGR::Feature::GetDefn | ( | ) |
Object method.
public scalar Geo::OGR::Feature::GetFID | ( | ) |
Object method.
public list Geo::OGR::Feature::GetField | ( | scalar | name | ) |
public scalar Geo::OGR::Feature::GetFieldDefn | ( | scalar | name | ) |
Object method. Get the definition of a field.
name | the name of the field. |
public list Geo::OGR::Feature::GetFieldNames | ( | ) |
Object method. Get the names of the fields in this feature.
public scalar Geo::OGR::Feature::GetGeomFieldDefn | ( | scalar | name | ) |
Object method. Get the definition of a spatial field.
name | the name of the spatial field. |
public method Geo::OGR::Feature::GetNativeData | ( | ) |
public method Geo::OGR::Feature::GetNativeMediaType | ( | ) |
public hash reference Geo::OGR::Feature::GetSchema | ( | ) |
Get the schema of this feature.
Object method.
public scalar Geo::OGR::Feature::GetStyleString | ( | ) |
Object method.
public method Geo::OGR::Feature::IsFieldNull | ( | ) |
public method Geo::OGR::Feature::IsFieldSetAndNotNull | ( | ) |
public Geo::OGR::Layer Geo::OGR::Feature::Layer | ( | ) |
Object method.
public Geo::OGR::Feature Geo::OGR::Feature::new | ( | hash | schema | ) |
Create a new feature.
Class method.
Named | parameters:
|
Schema is a hash with the following keys:
public method Geo::OGR::Feature::RELEASE_PARENT | ( | ) |
public hash reference Geo::OGR::Feature::Row | ( | hash | row | ) |
Object method.
Get and/or set the data of the feature. The key of the (key,value) pairs of the row is the field name. Special field names FID and Geometry are used for feature id and (single) geometry respectively. The geometry/ies is/are set and get using the Geo::OGR::Feature::Geometry method. Field values are set using the Geo::OGR::Feature::Field method.
row | [optional] feature data in a hash. |
public method Geo::OGR::Feature::SetFID | ( | scalar | id | ) |
Object method.
id | the feature id. |
public method Geo::OGR::Feature::SetField | ( | scalar | name, |
array | Value | ||
) |
public method Geo::OGR::Feature::SetFieldNull | ( | ) |
public method Geo::OGR::Feature::SetFrom | ( | scalar | other, |
scalar | forgiving = 1 , |
||
hashref | map | ||
) |
Object method.
other | a Geo::OGR::Feature object |
forgiving | [optional] set to false if the operation should not continue if output fields do not match some of the source fields |
map | [optional] a mapping from output field indexes to source fields, include into the hash all field indexes of this feature which should be set |
public method Geo::OGR::Feature::SetNativeData | ( | ) |
public method Geo::OGR::Feature::SetNativeMediaType | ( | ) |
public method Geo::OGR::Feature::SetStyleString | ( | scalar | string | ) |
Object method.
string |
Code:
click to view
|
public list Geo::OGR::Feature::Tuple | ( | array | tuple | ) |
Object method.
Get and/set the data of the feature. The expected data in the tuple is ([feature_id,] non-spatial fields, spatial fields). The fields in the tuple are in the order they are in the schema. Field values are set using the Geo::OGR::Feature::Field method. Geometries are set and get using the Geo::OGR::Feature::Geometry method.
tuple | [optional] feature data in an array |
public scalar Geo::OGR::Feature::Validate | ( | list | flags | ) |
Object method.
flags | one of more of null, geom_type, width, allow_null_when_default, or all. |
croaks | with an error message if the feature is not valid. |