Geo::GDAL 1.8.0

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 GetGeomType ()
 SetGeomType (scalar type)
scalar GetReferenceCount ()

Member Function Documentation

Geo::OGR::FeatureDefn::AddFieldDefn ( scalar  defn)
Parameters:
defna 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:
schemaThe schema for the new feature definition, as in Geo::OGR::FeatureDefn::Schema.
Returns:
a Geo::OGR::FeatureDefn object
scalar Geo::OGR::FeatureDefn::GeometryType ( scalar  geometry_type)

Get or set the geometry type. Alternative name: GeomType.

Parameters:
geometry_type[optional] one of geometry types
Returns:
the geometry types
scalar Geo::OGR::FeatureDefn::GetFieldCount ( )
Returns:
an integer
Geo::OGR::FieldDefn Geo::OGR::FeatureDefn::GetFieldDefn ( scalar  index)
Parameters:
index
Returns:
a new Geo::OGR::FieldDefn object
scalar Geo::OGR::FeatureDefn::GetFieldIndex ( scalar  name)
Parameters:
name
Returns:
integer (-1 if no such field)
scalar Geo::OGR::FeatureDefn::GetGeomType ( )
Deprecated:
use Geo::OGR::FeatureDefn::GeometryType, which returns a string
Returns:
geometry type as integer
scalar Geo::OGR::FeatureDefn::GetName ( )
Returns:
a string
scalar Geo::OGR::FeatureDefn::GetReferenceCount ( )
Returns:
integer
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:
Geo::OGR::FeatureDefn::SetGeomType ( scalar  type)
Deprecated:
use Geo::OGR::FeatureDefn::GeomType, which accepts a string
Parameters:
typeas integer

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