List of all members.
Member Function Documentation
- Parameters:
-
- Returns:
- boolean
- Parameters:
-
fid | [optional] the id to set for this feature |
- Returns:
- integer the id of this feature
Set or get the geometry in the feature. When setting, does a check against the schema (GeometryType) of the feature.
- Parameters:
-
- Returns:
- a copy of the geometry in the feature as a Geo::OGR::Geometry object (in a non-void context)
- Returns:
- integer the feature id
- Note:
- A number of GetFieldAs* methods exist but they are not documented. Syntax $feature->{field} can be used to access the field (v1.9.0)
- Parameters:
-
field | the name (or index) of the field |
- Returns:
- the value of the field, which may be a scalar or a list, depending on the field type.
- Parameters:
-
name | the name of the field |
- Returns:
- integer the index of the field (0..Count-1)
- Parameters:
-
field | the name (or index) of the field |
- Returns:
- one of field types
- Parameters:
-
field | the name (or index) of the field |
- Returns:
- boolean
Create a new Geo::OGR::Geometry object, which references the geometry within the feature and/or create a reference to the argument geometry within the feature. This method maintains a link between the two objects and will not let the feature object be destroyed while the geometry object exists. Use with caution.
- Note:
- a.k.a. SetGeometryDirectly (only reference in), GetGeometry (only create with a reference), GetGeometryRef (only create with a reference and do not create the link between the objects).
- Parameters:
-
- Returns:
- a new Geo::OGR::Geometry object in a non-void context
- Note:
- This method discards the data the destination feature (or layer) does not support. Changes in data due to differences between field types may also occur.
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.
- Parameters:
-
row | [optional] feature data in a hash |
- Returns:
- a reference to feature data in a hash
Get or set the schema. The schema is a hash (Name => name, GeometryType => geometry_type, Fields => [list of Geo::OGR::FieldDefn objects or hashrefs from which such can be created]. The Name and GeometryType cannot be set and the Fields are added to the schema. Fields is an array of hashrefs that contain schemas of FieldDefns
- Parameters:
-
- Returns:
- Note:
- Syntax $feature->{field} can be used to access the field (v1.9.0)
- Parameters:
-
field | the name (or index) of the field |
value | is 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. |
- Note:
- If value is not given or is undefined this method unsets the field.
- Parameters:
-
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 |
- Deprecated:
- use Geometry, which accepts Perl data and checks the geometry type Copy geometry into this feature.
- Parameters:
-
- Note:
- This method discards the data the destination feature (or layer) does not support. Changes in data due to differences between field types may also occur.
-
The schema of the tuple needs to be the same as that of the feature.
Get and/set the data of the feature. The order of the data in the tuple is: field_id, geometry, fields in their order. The geometry is set and get using the Geo::OGR::Feature::Geometry method. Field values are set using the Geo::OGR::Feature::SetField method.
- Parameters:
-
tuple | [optional] feature data in an array |
- Returns:
- feature data in an array
- Note:
- Field value can be unset by calling SetField without parameters or with an undefined argument.
- Parameters:
-
field | the name (or index) of the field |
The documentation for this class was generated from the following file: