Geo::OGR::DataSource Class Reference

Inherits Geo::OGR.

Inheritance diagram for Geo::OGR::DataSource:

Inheritance graph
[legend]
List of all members.

Public Class Methods

list Capabilities ()
Geo::OGR::DataSource Open (scalar name, scalar update=0)
Geo::OGR::DataSource OpenShared (scalar name, scalar update=0)

Public Object Methods

scalar TestCapability (scalar cap)
Geo::OGR::Layer Layer (scalar layer=0)
list Layers ()
scalar GetLayerCount ()
Geo::OGR::Driver GetDriver ()
scalar GetName ()
Geo::OGR::Layer CreateLayer (scalar Name, scalar SRS=undef, scalar GeometryType= 'Unknown', hashref Options=undef, hashref Schema=undef)
Geo::OGR::Layer CopyLayer (scalar layer, scalar name, hashref options=undef)
 DeleteLayer (scalar layer)
 DeleteLayer (hash param)
Geo::OGR::Layer ExecuteSQL (scalar statement, scalar geom=undef, scalar dialect="")
 ReleaseResultSet (scalar layer)
Geo::OGR::Layer GetLayerByIndex (scalar index=0)
Geo::OGR::Layer GetLayerByName (scalar name)

Public Attributes

list CAPABILITIES
 name

Member Function Documentation

list Geo::OGR::DataSource::Capabilities (  ) 

Returns:
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.

Geo::OGR::Layer Geo::OGR::DataSource::CopyLayer ( scalar  layer,
scalar  name,
hashref  options = undef 
)

Parameters:
layer A Geo::OGR::Layer object to be copied.
name A name for the new layer.
options A ref to a hash of format specific options.
Returns:
a new Geo::OGR::Layer object.

Geo::OGR::Layer Geo::OGR::DataSource::CreateLayer ( scalar  Name,
scalar  SRS = undef,
scalar  GeometryType = 'Unknown',
hashref  Options = undef,
hashref  Schema = undef 
)

Note:
This method can also be used with named parameters: $ds->CreateLayer({parameter=>value, ...}).
Example:
my $roads = Geo::OGR::Driver('Memory')->Create('road')->
    CreateLayer({GeometryType=>'LineString25D', Fields=>[{Name=>'class',Type=>'Integer'}]});

Parameters:
Name name for the new layer.
SRS a Geo::OSR::SpatialReference object.
GeometryType one of @Geo::OGR::Geometry::GEOMETRY_TYPES
Options a ref to a hash of format specific options.
Schema forwarded to Layer::Schema, which is called if this parameter exists. Additionally, if $Schema->{GeometryType} exists, it overrides $GeometryType argument and default.
Fields the fields for the schema of the layer [can be used only as a named parameter].
Returns:
a new Geo::OGR::Layer object

Geo::OGR::DataSource::DeleteLayer ( hash  param  ) 

Deletes a layer from the data source. Note that if there are layers objects for the deleted layer, they become unusable.

Parameters:
param Named parameter (name or index) for the layer to be deleted.

Geo::OGR::DataSource::DeleteLayer ( scalar  layer  ) 

Deletes a layer from the data source. Note that if there is a layer object for the deleted layer, it becomes unusable.

Parameters:
layer name (primary) or index (secondary) of the layer to be deleted, if ambiguous use named parameter syntax (name or index).

Geo::OGR::Layer Geo::OGR::DataSource::ExecuteSQL ( scalar  statement,
scalar  geom = undef,
scalar  dialect = "" 
)

Parameters:
statement A SQL statement.
geom A Geo::OGR::Geometry object.
dialect 
Returns:
a new Geo::OGR::Layer object.

Geo::OGR::Driver Geo::OGR::DataSource::GetDriver (  ) 

Returns:
a Geo::OGR::Driver object for this data source.

Geo::OGR::Layer Geo::OGR::DataSource::GetLayerByIndex ( scalar  index = 0  ) 

Parameters:
index A number.
Returns:
a new Geo::OGR::Layer object.

Geo::OGR::Layer Geo::OGR::DataSource::GetLayerByName ( scalar  name  ) 

Parameters:
name A string.
Returns:
a new Geo::OGR::Layer object.

scalar Geo::OGR::DataSource::GetLayerCount (  ) 

Returns:
the number of layers this data source provides.

scalar Geo::OGR::DataSource::GetName (  ) 

Returns:
the name of this data source.

Geo::OGR::Layer Geo::OGR::DataSource::Layer ( scalar  layer = 0  ) 

Parameters:
layer a name (primary) or index (secondary) of the requested layer. If not given, then returns the first layer.
Returns:
a new Geo::OGR::Layer object

list Geo::OGR::DataSource::Layers (  ) 

Returns:
a list of layers this data source provides.

Geo::OGR::DataSource Geo::OGR::DataSource::Open ( scalar  name,
scalar  update = 0 
)

An example:

use Geo::GDAL;
$ds = Geo::OGR::DataSource::Open('/data/roads.shp');
Parameters:
name The data source name (directory, filename, etc.).
update Whether to open the data source in update mode.
Returns:
a new Geo::OGR::DataSource object.

Reimplemented from Geo::OGR.

Geo::OGR::DataSource Geo::OGR::DataSource::OpenShared ( scalar  name,
scalar  update = 0 
)

Parameters:
name The data source name (directory, filename, etc.).
update Whether to open the data source in update mode.
Returns:
a new Geo::OGR::DataSource object.

Reimplemented from Geo::OGR.

Geo::OGR::DataSource::ReleaseResultSet ( scalar  layer  ) 

Parameters:
layer A layer the has been created with ExecuteSQL.

scalar Geo::OGR::DataSource::TestCapability ( scalar  cap  ) 

Parameters:
cap A capability string.
Returns:
a boolean value indicating whether the data source has the specified capability.


Member Data Documentation

list Geo::OGR::DataSource::CAPABILITIES

Data source capabilities known to GDAL

Geo::OGR::DataSource::name

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


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