Geo::GDAL 1.8.0

Geo::OGR::DataSource Class Reference

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

 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:
layerA Geo::OGR::Layer object to be copied.
nameA name for the new layer.
optionsA 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, ...}).
Parameters:
NameA name for the new layer.
SRSa Geo::OSR::SpatialReference object.
GeometryTypeOne of geometry types (a string: Point, LineString, or some else)
OptionsA ref to a hash of format specific options.
SchemaForwarded to Layer::Schema, which is called if this parameter exists.
Returns:
a new Geo::OGR::Layer object.
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:
layername (primary) or index (secondary) of the layer to be deleted, if ambiguous use named parameter syntax (name or index).
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:
paramNamed parameter (name or index) for the layer to be deleted.
Geo::OGR::Layer Geo::OGR::DataSource::ExecuteSQL ( scalar  statement,
scalar  geom = undef,
scalar  dialect = "" 
)
Parameters:
statementA SQL statement.
geomA 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:
indexA number.
Returns:
a new Geo::OGR::Layer object.
Geo::OGR::Layer Geo::OGR::DataSource::GetLayerByName ( scalar  name)
Parameters:
nameA 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.
Parameters:
layera 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:
nameThe data source name (directory, filename, etc.).
updateWhether 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:
nameThe data source name (directory, filename, etc.).
updateWhether 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:
layerA layer the has been created with ExecuteSQL.
scalar Geo::OGR::DataSource::TestCapability ( scalar  cap)
Parameters:
capA capability string.
Returns:
a boolean value indicating whether the data source has the specified capability.

Member Data Documentation

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


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