The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
## @ignore Geo::OGRc

## @class Geo::OGR

## @ignore TIEHASH
## @ignore CLEAR
## @ignore FIRSTKEY
## @ignore NEXTKEY
## @ignore FETCH
## @ignore STORE
## @ignore this

## @ignore BuildPolygonFromEdges
## @ignore ForceToMultiLineString
## @ignore ForceToMultiPoint
## @ignore ForceToMultiPolygon
## @ignore ForceToPolygon

## @ignore GeneralCmdLineProcessor
## @ignore GeometryTypeToName
## @ignore GetFieldTypeName

## @ignore UseExceptions()
## @ignore DontUseExceptions()

## @fn @GeometryTypes()
# @return a list of all geometry types.

## @ignore CreateGeometryFromWkb
## @ignore CreateGeometryFromWkt
## @ignore CreateGeometryFromGML
## @ignore CreateGeometryFromJson
## @ignore ApproximateArcAngles

## @fn @Drivers()
# @return a list of Geo::OGR::Driver objects, one for each OGR format.

## @fn $GetDriverCount()
# @return the number of all available drivers.

## @fn $GetOpenDSCount()
# @return the number of all open data sources.

## @fn SetGenerate_DB2_V72_BYTE_ORDER($Generate_DB2_V72_BYTE_ORDER)
# Needed only on IBM DB2.

## @ignore RegisterAll()
# Called in initialization.

## @fn Geo::OGR::DataSource GetOpenDS($number)
# @param number The number of the requested data source.
# @return a new Geo::OGR::DataSource object.

## @fn Geo::OGR::DataSource Open($name, $update = 0)
# @param name The data source string (directory, filename, etc.).
# @param update Whether to open the data source in update mode.
# @return a new Geo::OGR::DataSource object.

## @fn Geo::OGR::DataSource OpenShared($name, $update = 0)
# @param name The data source string (directory, filename, etc.).
# @param update Whether to open the data source in update mode.
# @return a new Geo::OGR::DataSource object.

## @fn Geo::OGR::Driver GetDriverByName($name)
# @param name
# @return a new Geo::OGR::Driver object.

## @fn Geo::OGR::Driver Driver($driver) 
# Create a driver object for the internal OGR driver.
# @note a.k.a. GetDriver
# @param driver the index or the name of the driver
# @return a new Geo::OGR::Driver object

## @ignore NullFID
## @ignore wkb25Bit
## @ignore wkb25DBit
## @ignore wkbUnknown
## @ignore wkbPoint
## @ignore wkbLineString
## @ignore wkbPolygon
## @ignore wkbMultiPoint
## @ignore wkbMultiLineString
## @ignore wkbMultiPolygon
## @ignore wkbGeometryCollection
## @ignore wkbNone
## @ignore wkbLinearRing
## @ignore wkbPoint25D
## @ignore wkbLineString25D
## @ignore wkbPolygon25D
## @ignore wkbMultiPoint25D
## @ignore wkbMultiLineString25D
## @ignore wkbMultiPolygon25D
## @ignore wkbGeometryCollection25D
## @ignore OFTInteger
## @ignore OFTIntegerList
## @ignore OFTReal
## @ignore OFTRealList
## @ignore OFTString
## @ignore OFTStringList
## @ignore OFTWideString
## @ignore OFTWideStringList
## @ignore OFTBinary
## @ignore OFTDate
## @ignore OFTTime
## @ignore OFTDateTime
## @ignore OJUndefined
## @ignore OJLeft
## @ignore OJRight
## @ignore wkbXDR
## @ignore wkbNDR
## @ignore OLCRandomRead
## @ignore OLCSequentialWrite
## @ignore OLCRandomWrite
## @ignore OLCFastSpatialFilter
## @ignore OLCFastFeatureCount
## @ignore OLCFastGetExtent
## @ignore OLCCreateField
## @ignore OLCTransactions
## @ignore OLCDeleteFeature
## @ignore OLCFastSetNextByIndex
## @ignore OLCAlterFieldDefn
## @ignore OLCDeleteField
## @ignore OLCIgnoreFields
## @ignore OLCReorderFields
## @ignore OLCStringsAsUTF8
## @ignore ODsCCreateLayer
## @ignore ODsCDeleteLayer
## @ignore ODrCCreateDataSource
## @ignore ODrCDeleteDataSource

## @class Geo::OGR::Driver
# @isa (Geo::OGR)

## @attr list CAPABILITIES
# Driver capabilities known to GDAL

## @ignore Register
## @ignore Deregister

## @attr name
# scalar (access as $driver->{name})

## @cmethod @Capabilities()
# @return a list of capabilities. The class method returns a list of
# all potential capabilities a driver may have; the object method
# returns a list of all capabilities the driver has.
# Examples.
# \code
# @all_capabilities = Geo::OGR::Driver::Capabilities;
# @capabilities_of_a_driver = Geo::OGR::Driver('KML')->Capabilities;
# \endcode

## @method $TestCapability($cap)
# @param cap A capability string.
# @return boolean value.

## @ignore CreateDataSource

## @method Geo::OGR::DataSource Create($name, \%options = undef )
# Create an OGR data source object.
# @note a.k.a. CreateDataSource
# @param name The data source name.
# @param options Driver specific options.
#
# Usage:
# \code
# $ds = Geo::OGR::Driver('driver name')->Create('data source name', {});
# \endcode
# @return a new Geo::OGR::DataSource object.

## @ignore CopyDataSource

## @method Geo::OGR::DataSource Copy($ds, $name, \@options = undef)
# Copy an OGR data source object.
# @note a.k.a. CopyDataSource
# @param ds The Geo::OGR::DataSource object to be copied.
# @param name The name for the new data source.
# @param options Driver specific options.
# @return a new Geo::OGR::DataSource object.

## @method Geo::OGR::DataSource Open($name, $update = 0)
# Open an OGR data source object. Alternative name: OpenDataSource.
# @param name The name of data source.
# @param update Whether to open the data source in update mode.
# @return a new Geo::OGR::DataSource object

## @ignore DeleteDataSource

## @method Delete($name)
# Delete an OGR data source.
# @note a.k.a. DeleteDataSource
# @param name The name of data source.

## @method $Name()
# @note a.k.a. GetName
# @return the name of the driver.


## @class Geo::OGR::DataSource
# @isa (Geo::OGR)

## @attr list CAPABILITIES
# Data source capabilities known to GDAL

## @ignore SyncToDisk

## @attr name
# string (access as $datasource->{name})

## @cmethod @Capabilities()
# @return a list of capabilities. The class method returns a list of
# all potential capabilities a data source may have; the object method
# returns a list of all capabilities the data source has.

## @method $TestCapability($cap)
# @param cap A capability string.
# @return a boolean value indicating whether the data source has the
# specified capability.

## @cmethod Geo::OGR::DataSource Open($name, $update = 0)
# An example:
# \code
# use Geo::GDAL;
# $ds = Geo::OGR::DataSource::Open('/data/roads.shp');
# \endcode
# @param name The data source name (directory, filename, etc.).
# @param update Whether to open the data source in update mode.
# @return a new Geo::OGR::DataSource object.

## @cmethod Geo::OGR::DataSource OpenShared($name, $update = 0)
# @param name The data source name (directory, filename, etc.).
# @param update Whether to open the data source in update mode.
# @return a new Geo::OGR::DataSource object.

## @method Geo::OGR::Layer Layer($layer = 0)
# @param layer a name (primary) or index (secondary) of the requested
# layer. If not given, then returns the first layer.
# @return a new Geo::OGR::Layer object

## @method @Layers()
# @return a list of layers this data source provides.

## @method $GetLayerCount()
# @return the number of layers this data source provides.

## @method Geo::OGR::Driver GetDriver()
# @return a Geo::OGR::Driver object for this data source.

## @method $GetName()
# @return the name of this data source.

## @method Geo::OGR::Layer CreateLayer($Name, $SRS = undef, $GeometryType = 'Unknown', \%Options = undef, \%Schema = undef)
# @note This method can also be used with named parameters: $ds->CreateLayer({parameter=>value, ...}).
#
# Example:
# \code
# my $roads = Geo::OGR::Driver('Memory')->Create('road')->
#     CreateLayer({GeometryType=>'LineString25D', Fields=>[{Name=>'class',Type=>'Integer'}]});
# \endcode
#
# @param Name name for the new layer.
# @param SRS a Geo::OSR::SpatialReference object.
# @param GeometryType one of \@Geo::OGR::Geometry::GEOMETRY_TYPES
# @param Options a ref to a hash of format specific options.
# @param Schema forwarded to Layer::Schema, which is called if this
# parameter exists. Additionally, if $Schema->{GeometryType} exists,
# it overrides $GeometryType argument and default.
# @param Fields the fields for the schema of the layer [can be used only as a named parameter].
# @return a new Geo::OGR::Layer object

## @method Geo::OGR::Layer CopyLayer($layer, $name, \%options = undef)
# @param layer A Geo::OGR::Layer object to be copied.
# @param name A name for the new layer.
# @param options A ref to a hash of format specific options.
# @return a new Geo::OGR::Layer object.

## @method DeleteLayer($layer)
# Deletes a layer from the data source. Note that if there is a layer
# object for the deleted layer, it becomes unusable.
# @param layer name (primary) or index (secondary) of the layer to be
# deleted, if ambiguous use named parameter syntax (name or index).

## @method DeleteLayer(%param)
# Deletes a layer from the data source. Note that if there are layers
# objects for the deleted layer, they become unusable.
# @param param Named parameter (name or index) for the layer to be
# deleted.

## @method Geo::OGR::Layer ExecuteSQL($statement, $geom = undef, $dialect = "")
# @param statement A SQL statement.
# @param geom A Geo::OGR::Geometry object.
# @param dialect
# @return a new Geo::OGR::Layer object.

## @method ReleaseResultSet($layer)
# @param layer A layer the has been created with ExecuteSQL.

## @method Geo::OGR::Layer GetLayerByIndex($index = 0)
# @param index A number.
# @return a new Geo::OGR::Layer object.

## @method Geo::OGR::Layer GetLayerByName($name)
# @param name A string.
# @return a new Geo::OGR::Layer object.

## @ignore GetRefCount

## @ignore GetSummaryRefCount


## @class Geo::OGR::Layer
# @isa (Geo::OGR)

## @attr list CAPABILITIES
# Layer capabilities known to GDAL

## @cmethod @Capabilities()
# Examples:
# \code
# @cap = Geo::OGR::Layer::Capabilities(); # the class method
# @cap = $layer->Capabilities(); # the object method
# \endcode
# @return a list of capabilities. The class method returns a list of
# all potential capabilities a layer may have. The object method
# returns a list of all capabilities the layer has.

## @method $TestCapability($cap)
# @param cap A capability string.
# @return a boolean value indicating whether the layer has the
# specified capability.

## @method Geo::OGR::DataSource DataSource()
# @return the data source object to which this layer object belongs to.

## @method %GetField($field_name)
# @param field_name the name (or index) of the field
# @return the schema of the field in a hash (in list context) or in an
# anonymous hash

## @method CreateField(%parameters)
# @param parameters named parameters: Name, Type, Justify, Width,
# Precision

## @method CreateField($field_definition, $approximation_ok)
# @deprecated use CreateField(hash parameters)
# @param field_definition a Geo::OGR::FieldDefn object
# @param approximation_ok may the field be created in a slightly
# different form depending on the limitations of the format driver.

## @method AlterField($field_name, %new_definition)
# @param field_name the name (or index) of the field to be altered
# @param new_definition one or more of Name, Type, and Width

## @method AlterFieldDefn($field, $definition, $flags)
# @deprecated use AlterField(scalar name, hash parameters)
# Alter the definition of an existing field on a layer.
# @param field index of the field whose definition is altered
# @param definition a Geo::OGR::FieldDefn object
# @param flags 1 to alter the name, 2 to alter the type, 4 to alter
# the width, use combinations 3, 5, 6 or 7 to alter two or more
# properties

## @method DeleteField($field)
# Delete an existing field from a layer.
# @param field name (or index) of the field which is deleted

## @method \%Schema(%schema)
# Get and/or set the schema of the layer.
# @param schema The schema hash may contain the keys:
# - \a Fields A reference to a list of field definitions (either
# Geo::OGR::FieldDefn objects or hashrefs from which they can be
# created).
# - \a ApproxOK (optional) A flag specifying whether it is ok to
# change the requested field definition to accommodate limitations of
# the layer.
# @return a reference to a schema hash, which has keys:
# - \a Name The name of this layer.
# - \a GeometryType The type of the geometries in this layer (a
# string).
# - \a Fields An array of references to hashes of field definitions.

## @method \%Row(%row)
# Get and/or set the data of a feature that has the supplied feature
# id (the next feature obtained with GetNextFeature is used if feature
# id is not given). Calls Geo::OGR::Feature::Row.
# @param row [optional] feature data
# @return a reference to feature data in a hash

## @method @Tuple(@tuple)
# Get and/set the data of a feature that has the supplied feature id
# (the next feature obtained with GetNextFeature is used if feature id
# is not given). The order of the data in the tuple is: feature id,
# Geometry, fields in their order. Calls Geo::OGR::Feature::Tuple.
# @param tuple [optional] feature data
# @note The schema of the tuple needs to be the same as that of the
# layer.
# @return a reference to feature data in an array

## @method Geo::OGR::Geometry SpatialFilter($filter)
# @param filter [optional] a Geo::OGR::Geometry object or a string. An
# undefined value removes the filter if there is one.
# @return a new Geo::OGR::Geometry object

## @method Geo::OGR::Geometry SpatialFilter(@filter)
# @param filter [optional] a rectangle ($minx, $miny, $maxx, $maxy).
# @return a new Geo::OGR::Geometry object

## @method SetSpatialFilter($filter)
# @param filter [optional] a Geo::OGR::Geometry object. If not given,
# removes the filter if there is one.

## @method SetSpatialFilterRect($minx, $miny, $maxx, $maxy)
# @param minx
# @param miny
# @param maxx
# @param maxy

## @method Geo::OGR::Geometry GetSpatialFilter()
# @return a new Geo::OGR::Geometry object

## @method SetAttributeFilter($filter_string)
# Set or clear the attribute filter.
# @param filter_string a SQL WHERE clause or undef to clear the
# filter.

## @method ResetReading()
# Initialize the layer object for iterative reading.

## @method Geo::OGR::Feature GetNextFeature()
# @return iteratively Geo::OGR::Feature objects from the layer. The
# iteration obeys the spatial and the attribute filter.

## @method SetNextByIndex($new_index)
# @param new_index the index to which set the read cursor in the
# current iteration

## @method $GetFeaturesRead()
# @return integer

## @method ForFeatures($code, $in_place)
# @note experimental, the syntax may change
#
# Call code for all features. This is a simple wrapper for
# ResetReading and while(GetNextFeature).
#
# Example usage:
# \code
# $layer->ForFeatures(sub {my $f = shift; $self->DeleteFeature($f->FID)}); # empties the layer
# \endcode
#
# @param code a reference to a subroutine, which is called with each
# feature as an argument
# @param in_place if set to true, the feature is stored back to the
# layer

## @method ForGeometries($code, $in_place)
# @note experimental, the syntax may change
#
# Call code for all geometries. This is a simple wrapper for
# ResetReading and while(GetNextFeature).
#
# Example usage:
# \code
# my $area = 0;
# $layer->ForGeometries(sub {my $g = shift; $area += $g->Area}); # computes the total area
# \endcode
#
# @param code a reference to a subroutine, which is called with each
# geometry as an argument
# @param in_place if set to true, the geometry is stored back to the
# layer

## @method $GetName()
# @return

## @method Geo::OGR::Feature GetFeature($fid)
# @param fid feature id
# @return a new Geo::OGR::Feature object

## @method SetFeature($feature)
# @note The feature should have the same schema as the layer.
#
# Replaces a feature in the layer based on the given feature's
# id. Requires RandomWrite capability.
# @param feature a Geo::OGR::Feature object

## @method CreateFeature($feature)
# @deprecated use Geo::OGR::Layer::InsertFeature which accepts Perl
# data and checks for geometry type and attribute data
#
# @note The feature should have the same schema as the layer.
#
# Inserts a feature into the layer. The given feature's id may change.
# @param feature a Geo::OGR::Feature object

## @method InsertFeature($feature)
# Creates a new feature which has the schema of the layer and
# initializes it with data from the argument. Then inserts the feature
# into the layer (using CreateFeature). Uses Geo::OGR::Feature::Row or
# Geo::OGR::Feature::Tuple.
# @param feature a Geo::OGR::Feature object or reference to feature
# data in a hash (as in Geo::OGR::Feature::Row) or in an array (as in
# Geo::OGR::Feature::Tuple)

## @method DeleteFeature($fid)
# @param fid feature id

## @method SyncToDisk()

## @method Geo::OGR::FeatureDefn GetLayerDefn()
# @deprecated use Geo::OGR::Layer::Schema, which returns a Perl structure
# @return a new Geo::OGR::FeatureDefn object

## @method $GetFeatureCount($force = 1)
# @param force
# @return integer

## @method @GetExtent($force = 1)
# @param force compute the extent even if it is expensive
# @note In scalar context returns a reference to an anonymous array
# containing the extent.
# @note The order of values is different from those returned by
# Geo::OGR::Geometry::GetEnvelope.
# @return the extent ($minx, $miny, $maxx, $maxy)

# @param force
# @return the extent = ($minx, $miny, $maxx, $maxy) as a listref

## @method StartTransaction()

## @method CommitTransaction()

## @method RollbackTransaction()

## @method Geo::OSR::SpatialReference GetSpatialRef()
# @return a new Geo::OSR::SpatialReference object

## @ignore GetRefCount

## @method $GetFIDColumn()
# @return the name of the underlying database column being used as the FID column, or "" if not supported.

## @method $GetGeometryColumn()
# @return the name of the underlying database column being used as the geometry column, or "" if not supported

## @ignore GetGeomType

## @method $GeometryType()
# @return the geometry type of the layer, one of \@Geo::OGR::Geometry::GEOMETRY_TYPES

## @ignore ReorderField
## @ignore ReorderFields

## @method SetIgnoredFields(@fields)
# @param fields a list of field names


## @class Geo::OGR::Feature
# @isa (Geo::OGR)

## @cmethod Geo::OGR::Feature new($feature_def)
# @param feature_def a Geo::OGR::FeatureDefn object
# @return a new Geo::OGR::Feature object

## @cmethod Geo::OGR::Feature create(%schema)
# @param schema as in Schema
# @return a new Geo::OGR::Feature object

## @method \%Schema(%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
# @param schema [optional]
# @return

## @method \%Row(%row)
# @note This method discards the data the destination feature (or
# layer) does not support. Changes in data due to differences between
# field types may also occur.
#
# Get and/or set the data of the feature. The key of the (key,value)
# pairs of the row is the field name. Special field names FID and
# Geometry are used for feature id and geometry respectively. The
# geometry is set and get using the Geo::OGR::Feature::Geometry
# method. Field values are set using the Geo::OGR::Feature::SetField
# method.
# @param row [optional] feature data in a hash
# @return a reference to feature data in a hash

## @method @Tuple(@tuple)
# @note This method discards the data the destination feature (or
# layer) does not support. Changes in data due to differences between
# field types may also occur.
# @note The schema of the tuple needs to be the same as that of the
# feature.
#
# Get and/set the data of the feature. The order of the data in the
# tuple is: field_id, geometry, fields in their order. The geometry is
# set and get using the Geo::OGR::Feature::Geometry method. Field
# values are set using the Geo::OGR::Feature::SetField method.
# @param tuple [optional] feature data in an array
# @return feature data in an array

## @method Geo::OGR::FeatureDefn GetDefnRef()
# @return a new Geo::OGR::FeatureDefn object

## @method Geo::OGR::FieldDefn GetFieldDefnRef($field)
# @param field the name (or index) of the field
# @return a new Geo::OGR::FieldDefn object

## @method $GetFieldType($field)
# @param field the name (or index) of the field
# @return one of field types

## @method SetGeometry($geometry)
# @deprecated use Geometry, which accepts Perl data and checks the geometry type
# Copy geometry into this feature.
# @param geometry a Geo::OGR::Geometry object

## @method $Geometry($geometry)
# Set or get the geometry in the feature. When setting, does a check
# against the schema (GeometryType) of the feature.
# @param geometry [optional] a Geo::OGR::Geometry object or data from
# which such can be created (using Geo::OGR::Geometry::create)
# @return a copy of the geometry in the feature as a
# Geo::OGR::Geometry object (in a non-void context)

## @ignore SetGeometryDirectly
## @ignore GetGeometry
## @ignore GetGeometryRef

## @method $ReferenceGeometry($geometry)
# Create a new Geo::OGR::Geometry object, which references the
# geometry within the feature and/or create a reference to the
# argument geometry within the feature. This method maintains a link
# between the two objects and will not let the feature object be
# destroyed while the geometry object exists. Use with caution.
# @note a.k.a. SetGeometryDirectly (only reference in), GetGeometry
# (only create with a reference), GetGeometryRef (only create with a
# reference and do not create the link between the objects).
# @param geometry [optional] a Geo::OGR::Geometry object
# @return a new Geo::OGR::Geometry object in a non-void context

## @method Geo::OGR::Feature Clone()
# @return a new Geo::OGR::Feature object

## @method $Equal($feature)
# @param feature a Geo::OGR::Feature object for comparison
# @return boolean

## @method $GetFieldIndex($name)
# @param name the name of the field
# @return integer the index of the field (0..Count-1)

## @method $GetFieldCount()
# @return an integer

## @ignore GetFieldAsString
## @ignore GetFieldAsInteger
## @ignore GetFieldAsDouble
## @ignore GetFieldAsDateTime
## @ignore GetFieldAsDoubleList
## @ignore GetFieldAsIntegerList
## @ignore GetFieldAsStringList

## @method @GetField($field)
# @note A number of GetFieldAs* methods exist but they are not
# documented. Syntax $feature->{field} can be used to access the
# field (v1.9.0)
# @param field the name (or index) of the field
# @return the value of the field, which may be a scalar or a list,
# depending on the field type.

## @ignore SetFieldDoubleList
## @ignore SetFieldIntegerList
## @ignore SetFieldStringList

## @method SetField($field, @value)
# @note Syntax $feature->{field} can be used to access the
# field (v1.9.0)
# @param field the name (or index) of the field
# @param value is 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.
# @note If value is not given or is undefined this method unsets the field.

## @ignore SetFromWithMap

## @method SetFrom($other, $forgiving = 1, \%map)
# @param other a Geo::OGR::Feature object
# @param forgiving [optional] set to false if the operation should not
# continue if output fields do not match some of the source fields
# @param map [optional] a mapping from output field indexes to source
# fields, include into the hash all field indexes of this feature
# which should be set

## @method $IsFieldSet($field)
# @param field the name (or index) of the field
# @return boolean

## @method UnsetField($field)
# @note Field value can be unset by calling SetField without
# parameters or with an undefined argument.
# @param field the name (or index) of the field

## @method $FID($fid)
# @param fid [optional] the id to set for this feature
# @return integer the id of this feature

## @method $GetFID()
# @return integer the feature id

## @method SetFID($fid)
# @param fid the feature id

## @method DumpReadable()

## @method $StyleString($string)
# @param string [optional]
# @return

## @method $GetStyleString()
# @return a string

## @method SetStyleString($string)
# @param string


## @class Geo::OGR::FeatureDefn
# @isa (Geo::OGR)

## @cmethod Geo::OGR::FeatureDefn new($name = undef)
# @param name
# @return a Geo::OGR::FeatureDefn object

## @cmethod Geo::OGR::FeatureDefn create(%schema)
# Example usage:
# \code
# $fd = Geo::OGR::FeatureDefn->create( 
#     Name => "name", 
#     GeometryType => "Polygon",
#     Fields => [{ Name => 'field1', Type => 'String' }] );
# \endcode
# @param schema The schema for the new feature definition, as in
# Geo::OGR::FeatureDefn::Schema.
# @return a Geo::OGR::FeatureDefn object

## @method \%Schema(%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.
# @param schema [optional]
# @return

## @method $GetName()
# @note a.k.a. Name
# @return a string

## @method $GetFieldCount()
# @return an integer

## @method Geo::OGR::FieldDefn GetFieldDefn($index)
# @deprecated use Geo::OGR::FeatureDefn::Schema
# @param index the index (0..field_count-1) of the field
# @return a new Geo::OGR::FieldDefn object

## @method $GetFieldIndex($name)
# @param name
# @return integer (0..field_count-1, -1 if no such field)

## @method AddFieldDefn($defn)
# @param defn a Geo::OGR::FieldDefn object

## @ignore GetGeomType
## @ignore SetGeomType

## @method $GeometryType($geometry_type)
# Get or set the geometry type.
# @note a.k.a. GeomType, GetGeomType (deprecated, returns an integer),
# SetGeomType (deprecated, requires an integer)
# @param geometry_type [optional] one of \@Geo::OGR::Geometry::GEOMETRY_TYPES
# @return the geometry type, one of \@Geo::OGR::Geometry::GEOMETRY_TYPES

## @ignore GetReferenceCount

## @ignore IsGeometryIgnored
## @ignore SetGeometryIgnored

## @method $GeometryIgnored($IgnoreState)
# @note a.k.a. GetGeometryIgnored (only get), SetGeometryIgnored (only set)
#
# Get or set the ignore status of geometry when fetching features.
# @return the ignore status of geometry
# @since 1.9.0

## @ignore IsStyleIgnored
## @ignore SetStyleIgnored

## @method $StyleIgnored($IgnoreState)
# @note a.k.a. GetStyleIgnored (only get), SetStyleIgnored (only set)
#
# Get or set the ignore status of style information when fetching features.
# @return the ignore status of style information
# @since 1.9.0


## @class Geo::OGR::FieldDefn
# @isa (Geo::OGR)

## @attr list FIELD_TYPES
# Field types supported by GDAL, one of: Integer IntegerList Real
# RealList String StringList WideString WideStringList Binary Date
# Time DateTime

## @attr list JUSTIFY_TYPES
# Justify types supported by GDAL, one of: Undefined Left Right

## @cmethod Geo::OGR::FieldDefn new($name = "unnamed", $field_type = $Geo::OGR::OFTString)
# @deprecated use Geo::OGR::FieldDefn::create, which accepts type as a string
# @param name
# @param field_type as integer
# @return a new Geo::OGR::FieldDefn object

## @cmethod Geo::OGR::FieldDefn create($name = "unnamed", $field_type = 'String')
# @param name
# @param field_type one of field types. Optional. Default is String.
#
# Usage:
# \code
# $fd = Geo::OGR::FieldDefn->create(...arguments...);
# \endcode
# @return a new Geo::OGR::FieldDefn object

## @cmethod Geo::OGR::FieldDefn create(%parameters)
# @param parameters named parameters: Name, Type, Justify, Width,
# Precision
#
# Usage:
# \code
# $fd = Geo::OGR::FieldDefn->create( Name => "name", Type => "FieldType", ...);
# \endcode
# @return a new Geo::OGR::FieldDefn object

## @method \%Schema(%parameters)
# Get the schema or set parts of the schema
# @param parameters [optional] named parameters: Name, Type, Justify,
# Width, Precision
# @return a reference to a hash whose keys are Name, Type, Justify,
# Width, and Precision

## @ignore GetName
## @ignore GetNameRef
## @ignore SetName

## @method $Name($name)
# Get and/or set the name of the field.
# @note a.k.a. GetName, GetNameRef, SetName
# @param name [optional]
# @return the name in non-void context

## @ignore GetFieldTypeName
## @ignore GetTypeName
## @ignore GetType
## @ignore SetType

## @method $Type($type)
# @note a.k.a. GetFieldTypeName, GetTypeName, GetType, SetType
# @param type [optional] one of field types: Integer, IntegerList, Real,
# RealList, String, StringList, WideString, WideStringList, Binary, Date,
# Time, or DateTime (wide strings are not really supported yet?)
# @return one of field types in non-void context

## @ignore GetJustify
## @ignore SetJustify

## @method $Justify($justify)
# Get and/or set the justification of this field.
# @note a.k.a. GetJustify, SetJustify
# @param justify [optional] as string: Undefined, Left, or Right
# @return one of Undefined Left Right in non-void context

## @ignore GetWidth
## @ignore SetWidth

## @method $Width($width)
# Get and/or set the field width.
# @note a.k.a. GetWidth, SetWidth
# @param width [optional]
# @return integer in non-void context

## @ignore GetPrecision
## @ignore SetPrecision

## @method $Precision($precision)
# Get and/or set the precision of this field.
# @note a.k.a. GetPrecision, SetPrecision
# @param precision [optional]
# @return integer in non-void context

## @ignore IsIgnored
## @ignore SetIgnored

## @method $Ignored($ignore)
# Get and/or set the ignore status (whether this field should be
# omitted when fetching features) of this field.
# @note a.k.a. IsIgnored, SetIgnored
# @param ignore [optional]
# @return the ignore status in non-void context
# @since 1.9.0

## @class Geo::OGR::Geometry
# @isa (Geo::OGR)
# @note Most spatial analysis methods require <a
# href="http://geos.osgeo.org/doxygen/">GEOS</a> to work rigorously.

## @attr list GEOMETRY_TYPES
# Geometry types supported by GDAL, one of: Unknown Point LineString
# Polygon MultiPoint MultiLineString MultiPolygon GeometryCollection
# None LinearRingPoint25D LineString25D Polygon25D MultiPoint25D
# MultiLineString25D MultiPolygon25D GeometryCollection25D

## @attr list BYTE_ORDER_TYPES
# Byte order strings, one of: XDR NDR

## @cmethod Geo::OGR::Geometry new($type = $Geo::OGR::wkbUnknown, $WKT = undef, $WKB = undef, $GML = undef)
# @deprecated use Geo::OGR::Geometry::create, which accepts type as a string
# @param type one of Geo::OGR::wkb*
# @param WKT
# @param WKB
# @param GML
# @return a new Geo::OGR::Geometry object

## @cmethod Geo::OGR::Geometry create($type)
# @param type One of geometry type strings: 'Point', 'LineString', etc.
#
# Usage:
# \code
# $g = Geo::OGR::Geometry->create(...arguments...);
# \endcode
# @return a new Geo::OGR::Geometry object

## @cmethod Geo::OGR::Geometry create(%params)
# @param %params A named parameter, one of: GeometryType, WKT,
# WKB, HEXWKB, HEXEWKB (PostGIS extended WKB), GML, GeoJSON, arc, and/or
# Points.
# - \a Points An anonymous array as in method
# Geo::OGR::Geometry::Points; Note: requires also GeometryType
# parameter
# - \a arc An anonymous list of [CenterX, CenterY, CenterZ,
#    PrimaryRadius, SecondaryRadius, Rotation, StartAngle, EndAngle,
#    MaxAngleStepSizeDegrees]
#
# @note uses CreateGeometryFrom* functions from Geo::OGR
#
# Usage:
# \code
# $g = Geo::OGR::Geometry->create(...arguments...);
# \endcode
# @return a new Geo::OGR::Geometry object

## @method FlattenTo2D()

## @method $CoordinateDimension($dimension)
# @param dimension [optional]
# @return 2 or 3

## @method $GetCoordinateDimension()
# @return an integer

## @method SetCoordinateDimension($dimension)
# @param dimension

## @method $GetDimension()
# @return 0, 1, or 2

## @ignore ExportToWkt

## @method $AsText()
# This geometric object in Well Known Text.
# @note a.k.a. ExportToWkt
# @return a WKT string

## @method $AsBinary($byte_order = 'XDR')
# This geometric object as a Well-known binary string.
# @note a.k.a. ExportToWkb
# @param byte_order XDR or NDR
# @return a WKB binary string

## @ignore ExportToGML

## @method $AsGML()
# This geometric object as a GML string.
# @note a.k.a. ExportToGML
# @return a GML string

## @ignore ExportToKML

## @method $AsKML()
# This geometric object as a KML string.
# @note a.k.a. ExportToKML
# @return KML string

## @ignore ExportToJson

## @method $AsJSON()
# This geometric object as a JSON string.
# @note a.k.a. ExportToJson
# @return JSON string

## @method AddPoint($x, $y, $z)
# Set the data of a point or add a point to a line string. Consider
# using Geo::OGR::Geometry::Points.  Note that the coordinate
# dimension is automatically upgraded to 25D (3) if z is given.
# @param x
# @param y
# @param z [optional]
# Calls internally the 2D or 3D version depending on the number of parameters.

## @method AddPoint_2D($x, $y)
# Set the data of a point or add a point to a line string. Consider
# using Geo::OGR::Geometry::Points.
# @param x
# @param y

## @method AddPoint_3D($x, $y, $z)
# Set the data of a point or add a point to a line string. Note that
# the coordinate dimension is automatically upgraded to 25D (3). Consider
# using Geo::OGR::Geometry::Points.
# @param x
# @param y
# @param z

## @method SetPoint($index, $x, $y, $z)
# Set the data of a point or a line string. Note that the coordinate
# dimension is automatically upgraded to 25D (3) if z is given.
# @param index
# @param x
# @param y
# @param z [optional]

## @method SetPoint_2D($index, $x, $y)
# @param index
# @param x
# @param y

## @method SetPoint_3D($index, $x, $y, $z)
# Set the data of a point or a line string. Note that the coordinate
# dimension is automatically upgraded to 25D (3).
# @param index
# @param x
# @param y
# @param z

## @method $GetPointCount()
# @return an integer

## @method @GetPoint($index = 0)
# @param index
# @return (x,y) or a list with more coordinates

## @method $GetPoint_2D($index = 0)
# @param index
# @return (x,y) or a list with more coordinates

## @method $GetPoint_3D($index = 0)
# @param index
# @return (x,y) or a list with more coordinates

## @method $GetX($index = 0)
# @param index
# @return a number

## @method $GetY($index = 0)
# @param index
# @return a number

## @method $GetZ($index = 0)
# @param index
# @return a number

## @method @Point($index, $x, $y, $z)
# Get or set the point
# @param index The index of the point. Optional (ignored if given) for
# Point and Point25D geometries.
# @param x [optional]
# @param y [optional]
# @param z [optional]
# @return

## @method \@Points(\@points)
# Get or set the points of the geometry. The points (vertices) are
# stored in obvious lists of lists. When setting, the geometry is
# first emptied. The method uses internally either AddPoint_2D or
# AddPoint_3D depending on the coordinate dimension of the input data.
#
# @note The same structure may represent different geometries
# depending on the actual geometry type of the object.
#
# @param points [optional] A reference to an array. A point is a reference to an
# array of numbers, a linestring or a ring is a reference to an array of points,
# a polygon is a reference to an array of rings, etc. 
#
# @return A reference to an array.

## @method Empty()
# Clear geometry data, i.e., remove all points, or, for a point, set
# the coordinate dimension as zero.

## @method $IsEmpty()
# Test whether the geometry is empty (has no points, or, for a point,
# has coordinate dimension of zero).
# @return boolean

## @method $IsRing()
# Test if the geometry is a ring. Requires GEOS in GDAL.
# @return boolean

## @method $IsSimple()
# Test the simplicity of the geometry (OGC sense). Requires GEOS in GDAL.
# @return boolean

## @method $IsValid()
# Test the validity of the geometry (OGC sense). Requires GEOS in GDAL.
# @return boolean

## @method Move($dx, $dy, $dz)
# Move every point of the object as defined by the parameters.
# @param dx
# @param dy
# @param dz [optional]

## @method AddGeometryDirectly($other)
# @param other a Geo::OGR::Geometry object

## @method AddGeometry($other)
# Add a copy of another geometry to a geometry collection
# @param other a Geo::OGR::Geometry object

## @method Geo::OGR::Geometry Clone()
# @return a new Geo::OGR::Geometry object

## @method $GeometryType()
# @return the geometry type

## @method $Length()
# @return the length of the linestring

## @ignore GetArea

## @method $Area()
# @note a.k.a. GetArea
# @return the area of the polygon or multipolygon

## @method $GetGeometryCount()
# @return an integer

## @method $GetGeometryRef($index)
# @param index
# @return a new Geo::OGR::Geometry object whose data is a part of the
# parent geometry

## @method Geo::OGR::Geometry ConvexHull()
# @return a new Geo::OGR::Geometry object

## @method Geo::OGR::Geometry BuildPolygonFromEdges($BestEffort = 0, $AutoClose = 0, $Tolerance = 0)
# Attempt to create a polygon from a collection of lines or from a multilinestring.
# @param BestEffort For future
# @param AutoClose Assure the first and last points of rings are same.
# @param Tolerance Snap distance.
# @exception Several possibilities, some are reported, some are general errors.
# @return a new Geo::OGR::Geometry object (Polygon)

## @method Geo::OGR::Geometry Collect(@geometries)
# Create a geometrycollection from this and possibly other geometries.
# @param geometries [optional] More geometries to add to the collection.
# @return a new Geo::OGR::Geometry object of type geometrycollection.

## @method @Dissolve()
# Dissolve a geometrycollection into separate geometries.
# @return a list of new Geo::OGR::Geometry objects cloned from the collection.

## @method Geo::OGR::Geometry ForceToPolygon()
# Attempt to create a polygon from the geometry.
# @exception None reported. If this method fails, just a copy is returned.
# @return a new Geo::OGR::Geometry object

## @method Geo::OGR::Geometry ForceToMultiPoint(@points)
# Attempt to create a multipoint from the geometry, which must be a point.
# @param points [optional] More points to add to the collection.
# @return a new Geo::OGR::Geometry object of type multipoint.

## @method Geo::OGR::Geometry ForceToMultiLineString(@linestrings)
# Attempt to create a multilinestring from the geometry, which must be a linestring.
# @param linestrings [optional] More linestrings to add to the collection.
# @return a new Geo::OGR::Geometry object of type multilinestring.

## @method Geo::OGR::Geometry ForceToMultiPolygon(@polygons)
# Attempt to create a multipolygon from the geometry, which must be a polygon.
# @param polygons [optional] More polygons to add to the collection.
# @return a new Geo::OGR::Geometry object of type multipolygon.

## @method Geo::OGR::Geometry ForceToCollection(@geometries)
# Create a geometrycollection from the geometry.
# @param geometries [optional] More geometries to add to the collection.
# @return a new Geo::OGR::Geometry object of type geometrycollection.

## @method Geo::OGR::Geometry Buffer($distance, $quadsecs = 30)
# @param distance
# @param quadsecs
# @return a new Geo::OGR::Geometry object

## @method Geo::OGR::Geometry Intersection($other)
# @param other a Geo::OGR::Geometry object
# @return a new Geo::OGR::Geometry object

## @method Geo::OGR::Geometry Union($other)
# @param other a Geo::OGR::Geometry object
# @return a new Geo::OGR::Geometry object

## @method Geo::OGR::Geometry UnionCascaded()
# @return a new Geo::OGR::Geometry object
# @since 1.8.0

## @method Geo::OGR::Geometry Difference($other)
# @param other a Geo::OGR::Geometry object
# @return a new Geo::OGR::Geometry object

## @ignore SymmetricDifference

## @method Geo::OGR::Geometry SymDifference($other)
# Compute symmetric difference. 
# @note a.k.a. SymmetricDifference
# @param other a Geo::OGR::Geometry object
# @return a new Geo::OGR::Geometry object
# @since 1.8.0

## @ignore GetBoundary

## @method Geo::OGR::Geometry Boundary()
# @note a.k.a. GetBoundary
# @return the boundary of this geometry as a geometry
# @since 1.8.0

## @method $Distance($other)
# @param other a Geo::OGR::Geometry object
# @return the distance to the other geometry

## @ignore Intersect

## @method $Intersects($other)
# @note a.k.a. Intersect (deprecated)
# @param other a Geo::OGR::Geometry object
# @return true if this geometry intersects with the other geometry, false otherwise

## @ignore Equal

## @method $Equals($other)
# @note a.k.a. Equal (deprecated)
# @param other a Geo::OGR::Geometry object
# @return true if this geometry is equivalent to the other geometry, false otherwise

## @method $Disjoint($other)
# @param other a Geo::OGR::Geometry object
# @return true if this geometry is disjoint from the other geometry, false otherwise

## @method $Touches($other)
# @param other a Geo::OGR::Geometry object
# @return true if this geometry touches the other geometry, false otherwise

## @method $Crosses($other)
# @param other a Geo::OGR::Geometry object
# @return true if this geometry crosses the other geometry, false otherwise

## @method $Within($other)
# @param other a Geo::OGR::Geometry object
# @return true if this geometry is within the other geometry, false otherwise

## @method $Contains($other)
# @param other a Geo::OGR::Geometry object
# @return true if this geometry contains the other geometry, false otherwise

## @method $Overlaps($other)
# @param other a Geo::OGR::Geometry object
# @return true if this geometry overlaps the other geometry, false otherwise

## @method Segmentize($MaxLength)
# Modify the geometry such it has no segment longer than the given length.
# @param MaxLength the given length

## @method Geo::OGR::Geometry Simplify($Tolerance)
# Simplify the geometry.
# @param Tolerance the length tolerance for the simplification
# @since 1.8.0
# @return a new Geo::OSR::Geometry object

## @method TransformTo($srs)
# @param srs a Geo::OSR::SpatialReference object

## @method Transform($trans)
# @param trans a Geo::OSR::CoordinateTransformation object

## @method Geo::OSR::SpatialReference GetSpatialReference()
# @return a new Geo::OSR::SpatialReference object

## @method AssignSpatialReference($srs)
# @param srs a Geo::OSR::SpatialReference object

## @method CloseRings()

## @method @GetEnvelope()
# @note In scalar context returns a reference to an anonymous array
# containing the envelope.
# @note The order of values is different from those returned by
# Geo::OGR::Layer::GetExtent.
# @return the envelope ($minx, $maxx, $miny, $maxy)

## @method @GetEnvelope3D()
# @note In scalar context returns a reference to an anonymous array
# containing the envelope.
# @return the 3-D envelope ($minx, $maxx, $miny, $maxy, $minz, $maxz)
# @since 1.9.0

## @method Geo::OGR::Geometry Centroid()
# @return a new Geo::OGR::Geometry object
# @since 1.8.0

## @method $WkbSize()
# @return an integer

## @method $GetGeometryType()
# @deprecated use Geo::OGR::Geometry::GeometryType, which returns the type as a string
# @return type as an integer

## @method $GetGeometryName()
# @deprecated use string names
# @return a string