Geo::GDAL  2.0
Geo::OGR::DataSource Class Reference

A source and/or storage of vector data layers. More...

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

Public Member Functions

public list Capabilities ()
 
public method CommitTransaction ()
 
public Geo::OGR::Layer CopyLayer (scalar layer, scalar name, hashref options=undef)
 
public Geo::OGR::Layer CreateLayer (hash params)
 Create a new layer into this data source. More...
 
public method DeleteLayer (scalar name)
 
public Geo::OGR::Layer ExecuteSQL (scalar statement, scalar geom=undef, scalar dialect="")
 
public method FlushCache ()
 
public Geo::OGR::Driver GetDriver ()
 
public Geo::OGR::Layer GetLayer (scalar name)
 
public list GetLayerNames ()
 
public scalar GetName ()
 
public method GetStyleTable ()
 
public Geo::OGR::DataSource Open (scalar name, scalar update=0)
 
public Geo::OGR::DataSource OpenShared (scalar name, scalar update=0)
 
public method ReleaseResultSet (scalar layer)
 
public method RollbackTransaction ()
 
public method SetStyleTable ()
 
public method StartTransaction ()
 
public scalar TestCapability (scalar cap)
 
public method new ()
 
- Public Member Functions inherited from Geo::GDAL::MajorObject
public scalar Description (scalar description)
 
public method Domains ()
 
public scalar GetDescription ()
 
public hash reference GetMetadata (scalar domain="")
 
public method GetMetadataDomainList ()
 
public hash reference Metadata (hashref metadata=undef, scalar domain= '')
 
public method SetDescription (scalar NewDesc)
 
public method SetMetadata (hashref metadata, scalar domain="")
 
- Public Member Functions inherited from Geo::GDAL
public list AccessTypes ()
 
public Geo::GDAL::Dataset AutoCreateWarpedVRT (Geo::GDAL::Dataset src, Geo::OSR::SpatialReference src_srs=undef, Geo::OSR::SpatialReference dst_srs=undef, scalar ResampleAlg='NearestNeighbour', scalar maxerror=0.0)
 
public method CPLBinaryToHex ()
 
public method CPLHexToBinary ()
 
public list Child (scalar node, scalar i)
 
public list Children (scalar node)
 
public method ComputeMedianCutPCT (Geo::GDAL::Band red, Geo::GDAL::Band green, Geo::GDAL::Band blue, scalar num_colors, scalar colors, subref progress, scalar progress_data)
 
public method ComputeProximity (Geo::GDAL::Band src, Geo::GDAL::Band proximity, hashref options, subref progress, scalar progress_data)
 
public scalar DataTypeIsComplex (scalar DataType)
 
public list DataTypeValueRange (scalar DataType)
 
public list DataTypes ()
 
public method Debug ()
 
public scalar DecToDMS (scalar angle, scalar axis, scalar precision=2)
 
public scalar DecToPackedDMS (scalar dec)
 
public method DitherRGB2PCT (scalar red, scalar green, scalar blue, scalar target, scalar colors, subref progress, scalar progress_data)
 
public method EscapeString ()
 
public scalar FindFile (scalar class, scalar basename)
 
public method FinderClean ()
 
public method GOA2GetAccessToken ()
 
public method GOA2GetAuthorizationURL ()
 
public method GOA2GetRefreshToken ()
 
public scalar GetCacheMax ()
 
public scalar GetCacheUsed ()
 
public scalar GetConfigOption (scalar key, scalar default)
 
public scalar GetDataTypeSize (scalar DataType)
 
public Geo::GDAL::Driver GetDriver (scalar name)
 
public list GetDriverNames ()
 
public method GetJPEG2000StructureAsString ()
 
public Geo::GDAL::Driver IdentifyDriver (scalar path, scalar siblings)
 
public list NodeData (scalar node)
 
public scalar NodeType (scalar type)
 
public list NodeTypes ()
 
public Geo::GDAL::Dataset Open (scalar name, scalar access= 'ReadOnly')
 
public Geo::GDAL::Dataset OpenEx (scalar name, scalar open_flags=0, array reference allowed_drivers=undef, array reference open_options=undef, array reference sibling_files=undef)
 
public Geo::GDAL::Dataset OpenShared (scalar name, scalar access= 'ReadOnly')
 
public scalar PackCharacter (scalar DataType)
 
public scalar PackedDMSToDec (scalar packed)
 
public array reference ParseXMLString (scalar XML)
 
public method Polygonize (Geo::GDAL::Band src, Geo::GDAL::Band mask, Geo::OGR::Layer out, scalar PixValField, hashref options, subref progress, scalar progress_data)
 
public method PopFinderLocation ()
 
public method PushFinderLocation (scalar path)
 
public list RIOResamplingTypes ()
 
public method RasterizeLayer (Geo::GDAL::Dataset ds, arrayref bands, Geo::OGR::Layer layer, scalar transformer, scalar arg, arrayref burn_values, hashref options, subref progress, scalar progress_data)
 
public method ReprojectImage (scalar src_ds, scalar dst_ds, scalar src_wkt=undef, scalar dst_wkt=undef, scalar ResampleAlg='NearestNeighbour', scalar WarpMemoryLimit=0, scalar maxerror=0.0, subref progress, scalar progress_data)
 
public list ResamplingTypes ()
 
public scalar SerializeXMLTree (arrayref XMLTree)
 
public method SetCacheMax (scalar Bytes)
 
public method SetConfigOption (scalar key, scalar value)
 
public method SieveFilter (Geo::GDAL::Band src, Geo::GDAL::Band mask, Geo::GDAL::Band dst, scalar threshold, scalar connectedness, hashref options, subref progress, scalar progress_data)
 
public scalar VersionInfo (scalar request= 'VERSION_NUM')
 
- 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 source and/or storage of vector data layers.

A data source object may, depending on its capabilities, create, open (as such or using GDAL SQL), copy, and delete layers.

Definition at line 5822 of file all.pm.

Member Function Documentation

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

Both a class and an object method.

Returns
a list of capabilities. The object method returns a list of all capabilities the data source has. The class method returns a list of all potential capabilities a data source may have. These are currently: CreateGeomFieldAfterCreateLayer, CreateLayer, CurveGeometries, DeleteLayer, EmulatedTransactions, and Transactions.
Code:
click to view
public method Geo::OGR::DataSource::CommitTransaction ( )
Code:
click to view
public 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.
Code:
click to view
public Geo::OGR::Layer Geo::OGR::DataSource::CreateLayer ( hash  params)

Create a new layer into this data source.

Parameters
%paramsA list of named parameters:
  • Name (scalar) name for the new layer.
  • Fields (array reference) a list of field definitions as in Geo::OGR::Layer::CreateField.
  • ApproxOK (boolean value, default is true) a flag, which is forwarded to Geo::OGR::Layer::CreateField.
  • Options (hash reference) driver specific hash of layer creation options.
  • Schema (hash reference, deprecated) may contain keys Name, Fields, GeomFields, GeometryType.
  • SRS (scalar, deprecated) the spatial reference for the default geometry field.
  • GeometryType (scalar) the type of the default geometry field (if only one geometry field).
Note
If Fields or Schema|Fields is not given, a default geometry field (Name => '', GeometryType => 'Unknown') is created. The type can be also set with the named parameter.

Example:

my $roads = Geo::OGR::Driver('Memory')->Create('road')->
. Fields => [ { Name => 'class',
. Type => 'Integer' },
. { Name => 'geom',
. Type => 'LineString25D' } ] );
Returns
a new Geo::OGR::Layer object.
Code:
click to view
public method Geo::OGR::DataSource::DeleteLayer ( scalar  name)

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

Parameters
namename of the layer to delete.
Code:
click to view
public 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. The data source object will exist as long as the layer object exists.
Code:
click to view
public method Geo::OGR::DataSource::FlushCache ( )
Code:
click to view
public Geo::OGR::Driver Geo::OGR::DataSource::GetDriver ( )
Returns
a Geo::OGR::Driver object for this data source.
Code:
click to view
public Geo::OGR::Layer Geo::OGR::DataSource::GetLayer ( scalar  name)
Parameters
namethe name of the requested layer. If not given, then returns the first layer in the data source.
Returns
a new Geo::OGR::Layer object that represents the layer in the data source.
Code:
click to view
public list Geo::OGR::DataSource::GetLayerNames ( )
Note
Delivers the functionality of undocumented method GetLayerCount.
Returns
a list of the names of the layers this data source provides.
Code:
click to view
public scalar Geo::OGR::DataSource::GetName ( )
Returns
the name of this data source.
Code:
click to view
public method Geo::OGR::DataSource::GetStyleTable ( )
Code:
click to view
public method Geo::OGR::DataSource::new ( )
Code:
click to view
public Geo::OGR::DataSource Geo::OGR::DataSource::Open ( scalar  name,
scalar  update = 0 
)

Class method. 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.
Code:
click to view
public Geo::OGR::DataSource Geo::OGR::DataSource::OpenShared ( scalar  name,
scalar  update = 0 
)

Class method.

Parameters
nameThe data source name (directory, filename, etc.).
updateWhether to open the data source in update mode.
Returns
a new Geo::OGR::DataSource object.
Code:
click to view
public method Geo::OGR::DataSource::ReleaseResultSet ( scalar  layer)
Parameters
layerA layer the has been created with ExecuteSQL.
Note
There is no need to call this method. The result set layer is released in the destructor of the layer that was created with SQL.
Code:
click to view
public method Geo::OGR::DataSource::RollbackTransaction ( )
Code:
click to view
public method Geo::OGR::DataSource::SetStyleTable ( )
Code:
click to view
public method Geo::OGR::DataSource::StartTransaction ( )
Code:
click to view
public scalar Geo::OGR::DataSource::TestCapability ( scalar  cap)
Parameters
capA capability string.
Returns
a boolean value indicating whether the data source has the specified capability.
Code:
click to view

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