Geo::OGR::FeatureDefn Class Reference

Inherits Geo::OGR.

Inheritance diagram for Geo::OGR::FeatureDefn:

Inheritance graph
[legend]
List of all members.

Public Class Methods

Geo::OGR::FeatureDefn new (scalar name=undef)
Geo::OGR::FeatureDefn create (hash schema)

Public Object Methods

hashref Schema (hash schema)
scalar GetName ()
scalar GetFieldCount ()
Geo::OGR::FieldDefn GetFieldDefn (scalar index)
scalar GetFieldIndex (scalar name)
 AddFieldDefn (scalar defn)
scalar GeometryType (scalar geometry_type)
scalar GeometryIgnored (scalar IgnoreState)
scalar StyleIgnored (scalar IgnoreState)

Member Function Documentation

Geo::OGR::FeatureDefn::AddFieldDefn ( scalar  defn  ) 

Parameters:
defn a Geo::OGR::FieldDefn object

Geo::OGR::FeatureDefn Geo::OGR::FeatureDefn::create ( hash  schema  ) 

Example usage:

$fd = Geo::OGR::FeatureDefn->create( 
    Name => "name", 
    GeometryType => "Polygon",
    Fields => [{ Name => 'field1', Type => 'String' }] );
Parameters:
schema The schema for the new feature definition, as in Geo::OGR::FeatureDefn::Schema.
Returns:
a Geo::OGR::FeatureDefn object

scalar Geo::OGR::FeatureDefn::GeometryIgnored ( scalar  IgnoreState  ) 

Note:
a.k.a. GetGeometryIgnored (only get), SetGeometryIgnored (only set)
Get or set the ignore status of geometry when fetching features.
Returns:
the ignore status of geometry
Since:
1.9.0

scalar Geo::OGR::FeatureDefn::GeometryType ( scalar  geometry_type  ) 

Get or set the geometry type.

Note:
a.k.a. GeomType, GetGeomType (deprecated, returns an integer), SetGeomType (deprecated, requires an integer)
Parameters:
geometry_type [optional] one of @Geo::OGR::Geometry::GEOMETRY_TYPES
Returns:
the geometry type, one of @Geo::OGR::Geometry::GEOMETRY_TYPES

scalar Geo::OGR::FeatureDefn::GetFieldCount (  ) 

Returns:
an integer

Geo::OGR::FieldDefn Geo::OGR::FeatureDefn::GetFieldDefn ( scalar  index  ) 

Deprecated:
use Geo::OGR::FeatureDefn::Schema
Parameters:
index the index (0..field_count-1) of the field
Returns:
a new Geo::OGR::FieldDefn object

scalar Geo::OGR::FeatureDefn::GetFieldIndex ( scalar  name  ) 

Parameters:
name 
Returns:
integer (0..field_count-1, -1 if no such field)

scalar Geo::OGR::FeatureDefn::GetName (  ) 

Note:
a.k.a. Name
Returns:
a string

Geo::OGR::FeatureDefn Geo::OGR::FeatureDefn::new ( scalar  name = undef  ) 

Parameters:
name 
Returns:
a Geo::OGR::FeatureDefn object

hashref Geo::OGR::FeatureDefn::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 (see Geo::OGR::FieldDefn::create)]. The Name cannot be set and the Fields are added to the schema. Fields is an array of hashrefs that contain schemas of FieldDefns. In addition, in the 'get' form of the function, each field hash contains key 'Index', whose value is the index of the field.

Parameters:
schema [optional]
Returns:

scalar Geo::OGR::FeatureDefn::StyleIgnored ( scalar  IgnoreState  ) 

Note:
a.k.a. GetStyleIgnored (only get), SetStyleIgnored (only set)
Get or set the ignore status of style information when fetching features.
Returns:
the ignore status of style information
Since:
1.9.0


The documentation for this class was generated from the following file:
Generated on 26 May 2013 for Geo::GDAL by  doxygen 1.4.7