Geo::GDAL  1.11
Geo::OGR::FeatureDefn Class Reference
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

Parameters:
defna Geo::OGR::FieldDefn object

Example usage:

$fd = Geo::OGR::FeatureDefn->create( 
    Name => "name", 
    GeometryType => "Polygon",
    Fields => [{ Name => 'field1', Type => 'String' }] );
Parameters:
schemaThe 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
Returns:
an integer
Deprecated:
use Geo::OGR::FeatureDefn::Schema
Parameters:
indexthe 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)
Note:
a.k.a. Name
Returns:
a string
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: