Geo::GDAL 1.8.0

Geo::OGR::Feature Class Reference

Inheritance diagram for Geo::OGR::Feature:
Inheritance graph
[legend]

List of all members.

Public Class Methods

Geo::OGR::Feature new (scalar feature_def)

Public Object Methods

hashref Schema (hash schema)
hashref Row (hash row)
list Tuple (list tuple)
Geo::OGR::FeatureDefn GetDefnRef ()
scalar Geometry (scalar geometry)
 SetGeometry (scalar geometry)
 SetGeometryDirectly (scalar geometry)
Geo::OGR::Geometry GetGeometry ()
Geo::OGR::Feature Clone ()
scalar Equal (scalar feature)
scalar GetFieldCount ()
Geo::OGR::FieldDefn GetFieldDefnRef (scalar param)
list GetField (scalar field)
scalar IsFieldSet (scalar field)
scalar GetFieldIndex (scalar name)
scalar FID (scalar fid)
scalar GetFID ()
 SetFID (scalar fid)
 DumpReadable ()
 UnsetField (scalar field)
 SetField (scalar field, list value)
 SetFrom (scalar other, scalar forgiving=1)
scalar StyleString (scalar string)
scalar GetStyleString ()
 SetStyleString (scalar string)
scalar GetFieldType (scalar field)
scalar GetFieldAsString (scalar field)
scalar GetFieldAsInteger (scalar field)
scalar GetFieldAsDouble (scalar field)
Geo::OGR::Geometry GetGeometryRef ()

Member Function Documentation

Geo::OGR::Feature Geo::OGR::Feature::Clone ( )
Returns:
a new Geo::OGR::Feature object
Geo::OGR::Feature::DumpReadable ( )
scalar Geo::OGR::Feature::Equal ( scalar  feature)
Parameters:
featurea Geo::OGR::Feature object for comparison
Returns:
boolean
scalar Geo::OGR::Feature::FID ( scalar  fid)
Parameters:
fid[optional]
Returns:
integer the feature id
scalar Geo::OGR::Feature::Geometry ( scalar  geometry)

Get a copy of the geometry or copy the geometry into the feature.

Parameters:
geometry[optional]
Geo::OGR::FeatureDefn Geo::OGR::Feature::GetDefnRef ( )
Returns:
a new Geo::OGR::FeatureDefn object
scalar Geo::OGR::Feature::GetFID ( )
Returns:
integer the feature id
list Geo::OGR::Feature::GetField ( scalar  field)
Parameters:
fieldthe index or the name of the field
Returns:
the value of the field, which may be a scalar or a list, depending on the field type.
scalar Geo::OGR::Feature::GetFieldAsDouble ( scalar  field)
scalar Geo::OGR::Feature::GetFieldAsInteger ( scalar  field)
scalar Geo::OGR::Feature::GetFieldAsString ( scalar  field)
scalar Geo::OGR::Feature::GetFieldCount ( )
Returns:
an integer
Geo::OGR::FieldDefn Geo::OGR::Feature::GetFieldDefnRef ( scalar  param)
Parameters:
paramthe index or the name of the field
Returns:
a new Geo::OGR::FieldDefn object
scalar Geo::OGR::Feature::GetFieldIndex ( scalar  name)
Parameters:
namethe name of the field
Returns:
integer the index of the field
scalar Geo::OGR::Feature::GetFieldType ( scalar  field)
Parameters:
fieldthe index or the name of the field
Returns:
one of field types
Geo::OGR::Geometry Geo::OGR::Feature::GetGeometry ( )

Creates a new Geo::OGR::Geometry object, whose data is owned by the feature. The underlying OGR feature is not destroyed while the geometry object exists.

Returns:
a new Geo::OGR::Geometry object
Geo::OGR::Geometry Geo::OGR::Feature::GetGeometryRef ( )

Creates a new Geo::OGR::Geometry object, whose data is still owned by the feature. This link is not recorded.

Deprecated:
use Geo::OGR::Feature::GetGeometry unless you know what you are doing.
Returns:
a new Geo::OGR::Geometry object
scalar Geo::OGR::Feature::GetStyleString ( )
Returns:
a string
scalar Geo::OGR::Feature::IsFieldSet ( scalar  field)
Parameters:
fieldthe index or the name of the field
Returns:
boolean
Geo::OGR::Feature Geo::OGR::Feature::new ( scalar  feature_def)
Parameters:
feature_defa Geo::OGR::FeatureDefn object
Returns:
a new Geo::OGR::Feature object
hashref 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 names FID and Geometry are used for feature id and Geometry respectively. The geometry is a Geo::OGR::Geometry object whose data is or will become owned by the feature; or data from which a geometry object can be created (a hashref that is fed to Geo::OGR::Geometry::create). It is ok to set only a subset of the fields, those fields whose keys do not exist are left unchanged.

Parameters:
row[optional]
Returns:
hashref Geo::OGR::Feature::Schema ( hash  schema)

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:
schema[optional]
Returns:
Geo::OGR::Feature::SetFID ( scalar  fid)
Parameters:
fidthe feature id
Geo::OGR::Feature::SetField ( scalar  field,
list  value 
)
Parameters:
fieldthe index or the name of the field
valueis 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.
Geo::OGR::Feature::SetFrom ( scalar  other,
scalar  forgiving = 1 
)
Parameters:
othera Geo::OGR::Feature object
forgiving
Geo::OGR::Feature::SetGeometry ( scalar  geometry)

The geometry is copied into the feature.

Parameters:
geometrya Geo::OGR::Geometry object
Geo::OGR::Feature::SetGeometryDirectly ( scalar  geometry)

This feature is not destroyed while the Geo::OGR::Geometry object exists.

Parameters:
geometrya Geo::OGR::Geometry object
Geo::OGR::Feature::SetStyleString ( scalar  string)
Parameters:
string
scalar Geo::OGR::Feature::StyleString ( scalar  string)
Parameters:
string[optional]
Returns:
list Geo::OGR::Feature::Tuple ( list  tuple)

Get and/set the data of the feature. The order of the data in the tuple is: FID, Geometry, fields in their order. The geometry is a Geo::OGR::Geometry object whose data is or will become owned by the feature; or data from which a geometry object can be created (a hashref that is fed to Geo::OGR::Geometry::create). It is ok to leave FID and Geometry undefined, they are set only if they are defined.

Parameters:
tuple[optional]
Returns:
Geo::OGR::Feature::UnsetField ( scalar  field)
Parameters:
fieldthe index or the name of the field

The documentation for this class was generated from the following file: