Geo::GDAL
2.0
|
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. More... | |
public method | Field (scalar name, array Value) |
Get or set the field. More... | |
public method | FillUnsetWithDefault () |
public scalar | Geometry (scalar name, scalar geometry) |
Get or set the value of a geometry field. More... | |
public Geo::OGR::FeatureDefn | GetDefn () |
public scalar | GetFID () |
public list | GetField (scalar name) |
public method | GetFieldAsBinary () |
public method | GetFieldAsInteger64 () |
public Geo::OGR::FieldDefn | GetFieldDefn (scalar name) |
public list | GetFieldNames () |
public hash reference | GetSchema () |
Get the schema of this feature. More... | |
public scalar | GetStyleString () |
public scalar | IsFieldSet (scalar field) |
public hash reference | Row (hash row) |
public method | SetFID (scalar id) |
public method | SetField (scalar name, array Value) |
public method | SetFieldBinaryFromHexString () |
public method | SetFieldInteger64 () |
public method | SetFrom (scalar other, scalar forgiving=1, hashref map) |
public method | SetStyleString (scalar string) |
public list | Tuple (array tuple) |
public method | UnsetField (scalar field) |
public scalar | Validate (list flags) |
public Geo::OGR::Feature | new (hash schema) |
Public Member Functions inherited from Geo::OGR | |
public list | ByteOrders () |
public scalar | GeometryTypeModify (scalar type, scalar modifier) |
public scalar | GeometryTypeTest (scalar type, scalar test, scalar type2) |
public list | GeometryTypes () |
public Geo::OGR::Driver | GetDriver (scalar name) |
public list | GetDriverNames () |
public method | GetNonLinearGeometriesEnabledFlag () |
public Geo::OGR::DataSource | GetOpenDS (scalar number) |
public scalar | GetOpenDSCount () |
public method | OLMD_FID64 () |
public Geo::OGR::DataSource | Open (scalar name, scalar update=0) |
public Geo::OGR::DataSource | 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 | ( | ) |
Write the contents of this feature to stdout.
public scalar Geo::OGR::Feature::Equal | ( | scalar | feature | ) |
public scalar Geo::OGR::Feature::FID | ( | scalar | id | ) |
Get or set the id of this feature.
id | [optional] the id to set for this feature. |
public method Geo::OGR::Feature::Field | ( | scalar | name, |
array | Value | ||
) |
Get or set the field.
name | the name of the field. |
Value | a scalar or list depending on the field type. |
public method Geo::OGR::Feature::FillUnsetWithDefault | ( | ) |
public scalar Geo::OGR::Feature::Geometry | ( | scalar | name, |
scalar | geometry | ||
) |
Get or set the value of a geometry field.
Set or get the geometry in the feature. When setting, does a check against the schema (GeometryType) of the feature. The ownership of the geometry is given (if the parameter is an object) or kept to the feature and thus the geometry will keep the feature alive as long as the geometry is alive.
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 spatial field. |
geometry | [optional] a Geo::OGR::Geometry object or a hash array from which such can be created (using Geo::OGR::Geometry::new) |
public Geo::OGR::FeatureDefn Geo::OGR::Feature::GetDefn | ( | ) |
public scalar Geo::OGR::Feature::GetFID | ( | ) |
public list Geo::OGR::Feature::GetField | ( | scalar | name | ) |
name | the name of the field |
public method Geo::OGR::Feature::GetFieldAsBinary | ( | ) |
public method Geo::OGR::Feature::GetFieldAsInteger64 | ( | ) |
public Geo::OGR::FieldDefn Geo::OGR::Feature::GetFieldDefn | ( | scalar | name | ) |
name | the name of the field. |
public list Geo::OGR::Feature::GetFieldNames | ( | ) |
Get the names of the fields in this feature.
public hash reference Geo::OGR::Feature::GetSchema | ( | ) |
Get the schema of this feature.
public scalar Geo::OGR::Feature::GetStyleString | ( | ) |
public scalar Geo::OGR::Feature::IsFieldSet | ( | scalar | field | ) |
field | the name (or index) of the field |
public Geo::OGR::Feature Geo::OGR::Feature::new | ( | hash | schema | ) |
Class method.
schema | as in Schema |
public hash reference Geo::OGR::Feature::Row | ( | hash | row | ) |
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 geometry respectively. The geometry is set and get using the Geo::OGR::Feature::Geometry method. Field values are set using the Geo::OGR::Feature::SetField method.
row | [optional] feature data in a hash. |
public method Geo::OGR::Feature::SetFID | ( | scalar | id | ) |
id | the feature id. |
public method Geo::OGR::Feature::SetField | ( | scalar | name, |
array | Value | ||
) |
name | the name of the field. |
Value | a string, integer, double, a list (year, month, day), a list (hour, minute, second, tzflag), a list (year, month, day, hour, minute, second, tzflag), or a list of integers, doubles, or strings. |
public method Geo::OGR::Feature::SetFieldBinaryFromHexString | ( | ) |
public method Geo::OGR::Feature::SetFieldInteger64 | ( | ) |
public method Geo::OGR::Feature::SetFrom | ( | scalar | other, |
scalar | forgiving = 1 , |
||
hashref | map | ||
) |
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::SetStyleString | ( | scalar | string | ) |
string |
Code:
click to view
|
public list Geo::OGR::Feature::Tuple | ( | array | tuple | ) |
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 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 method Geo::OGR::Feature::UnsetField | ( | scalar | field | ) |
field | the name (or index) of the field |
public scalar Geo::OGR::Feature::Validate | ( | list | flags | ) |
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. |