Geo::GDAL  2.0
Geo::OGR::FeatureDefn Class Reference

A definition of the attributes of a feature class or a layer. More...

+ Inheritance diagram for Geo::OGR::FeatureDefn:
+ Collaboration diagram for Geo::OGR::FeatureDefn:

Public Member Functions

public method AddField (hash params)
 
public method DeleteField (scalar name)
 
public object GetFieldDefn (scalar name)
 
public list GetFieldNames ()
 
public scalar GetName ()
 
public hash reference GetSchema ()
 Get the schema of this feature or layer definition. More...
 
public method IsSame (Geo::OGR::FeatureDefn defn)
 
public scalar IsStyleIgnored ()
 
public method SetStyleIgnored (scalar IgnoreState)
 
public Geo::OGR::FeatureDefn new (hash schema)
 
- Public Member Functions inherited from Geo::OGR
public list ByteOrders ()
 
public scalar GeometryTypeModify (scalar type, scalar modifier)
 
public scalar GeometryTypeTest (scalar type, scalar test, scalar type2)
 
public list GeometryTypes ()
 
public Geo::OGR::Driver GetDriver (scalar name)
 
public list GetDriverNames ()
 
public method GetNonLinearGeometriesEnabledFlag ()
 
public Geo::OGR::DataSource GetOpenDS (scalar number)
 
public scalar GetOpenDSCount ()
 
public method OLMD_FID64 ()
 
public Geo::OGR::DataSource Open (scalar name, scalar update=0)
 
public Geo::OGR::DataSource OpenShared (scalar name, scalar update=0)
 
public method SetGenerate_DB2_V72_BYTE_ORDER (scalar Generate_DB2_V72_BYTE_ORDER)
 
public method SetNonLinearGeometriesEnabledFlag ()
 

Detailed Description

A definition of the attributes of a feature class or a layer.

A definition object is a collection of field definition objects. A read-only definition object is obtained from a layer or a feature.

Definition at line 7418 of file all.pm.

Member Function Documentation

public method Geo::OGR::FeatureDefn::AddField ( hash  params)
Parameters
paramsnamed parameters to create a new Geo::OGR::FieldDefn or Geo::OGR::GeomFieldDefn object.
Code:
click to view
public method Geo::OGR::FeatureDefn::DeleteField ( scalar  name)
Note
Currently only geometry fields can be deleted.
Parameters
indexthe index of the geometry field to be deleted.
Code:
click to view
public object Geo::OGR::FeatureDefn::GetFieldDefn ( scalar  name)
Parameters
namethe name of the field.
Returns
either a Geo::OGR::FieldDefn or Geo::OGR::GeomFieldDefn object that represents the field in question.
Code:
click to view
public list Geo::OGR::FeatureDefn::GetFieldNames ( )

The names of the fields in this layer or feature definition.

Returns
the list of field names.
Code:
click to view
public scalar Geo::OGR::FeatureDefn::GetName ( )
Returns
the name of this layer or feature definition.
Code:
click to view
public hash reference Geo::OGR::FeatureDefn::GetSchema ( )

Get the schema of this feature or layer definition.

The schema is a hash whose keywords are Name, StyleIgnored and Fields. Fields is an anonymous array of first non-spatial and then spatial field schemas as in Geo::OGR::FieldDefn::Schema and Geo::OGR::GeomFieldDefn::Schema.

Returns
the schema of this feature or layer definition.
Code:
click to view
public method Geo::OGR::FeatureDefn::IsSame ( Geo::OGR::FeatureDefn  defn)
Returns
true if this definition is similar to the other definition, false otherwise.
Code:
click to view
public scalar Geo::OGR::FeatureDefn::IsStyleIgnored ( )

Get the ignore status of style information when fetching features.

Returns
the ignore status of style information
Since
1.9.0
Code:
click to view
public Geo::OGR::FeatureDefn Geo::OGR::FeatureDefn::new ( hash  schema)

Class method. Creates a new layer or feature definition. The new definition is either initialized to the given schema or it will contain no non-spatial fields and one spatial field, whose Name is '' and GeometryType is 'Unknown' or the value of the named parameter GeometryType.

Parameters
schema[optional] The schema for the new feature definition, as in Geo::OGR::FeatureDefn::Schema.
Returns
a Geo::OGR::FeatureDefn object

Example usage:

Name => "name",
Fields => [{ Name => 'field1', Type => 'String' },
{ Name => 'geom', GeometryType => 'Point' }] );
Code:
click to view
public method Geo::OGR::FeatureDefn::SetStyleIgnored ( scalar  IgnoreState)

Set the ignore status of style information when fetching features.

Since
1.9.0
Code:
click to view

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