Geo::GDAL
2.0
|
A collection of similar features. More...
Public Member Functions | |
public method | AlterFieldDefn (scalar name, hash params) |
public list | Capabilities () |
public method | Clip (Geo::OGR::Layer method, Geo::OGR::Layer result, hashref options, subref callback, scalar callback_data) |
public method | CommitTransaction () |
public method | CreateFeature (scalar feature) |
public method | CreateField (hash params) |
public method | DataSource () |
public method | DeleteFeature (scalar fid) |
public method | DeleteField (scalar field) |
public method | Erase (Geo::OGR::Layer method, Geo::OGR::Layer result, hashref options, subref callback, scalar callback_data) |
public method | ForFeatures (scalar code, scalar in_place) |
public method | ForGeometries (scalar code, scalar in_place) |
public method | GeometryType () |
public Geo::OGR::DataSource | GetDataSource () |
public Geo::OGR::FeatureDefn | GetDefn () |
public list | GetExtent (scalar force=1) |
public scalar | GetFIDColumn () |
public Geo::OGR::Feature | GetFeature (scalar fid) |
public scalar | GetFeatureCount (scalar force=1) |
public scalar | GetFeaturesRead () |
public hash | GetFieldDefn (scalar name) |
public list | GetFieldNames () |
public scalar | GetName () |
public Geo::OGR::Feature | GetNextFeature () |
public hash reference | GetSchema () |
Get the schema of this layer. More... | |
public Geo::OGR::Geometry | GetSpatialFilter () |
public method | GetStyleTable () |
public method | Identity (Geo::OGR::Layer method, Geo::OGR::Layer result, hashref options, subref callback, scalar callback_data) |
public method | InsertFeature (scalar feature) |
public method | Intersection (Geo::OGR::Layer method, Geo::OGR::Layer result, hashref options, subref callback, scalar callback_data) |
public method | ReorderField () |
public method | ReorderFields () |
public method | ResetReading () |
public method | RollbackTransaction () |
public hash reference | Row (hash row) |
public method | SetAttributeFilter (scalar filter_string) |
public method | SetFeature (scalar feature) |
public method | SetIgnoredFields (array fields) |
public method | SetNextByIndex (scalar new_index) |
public method | SetSpatialFilter (scalar filter) |
public method | SetSpatialFilterRect (scalar minx, scalar miny, scalar maxx, scalar maxy) |
public method | SetStyleTable () |
public Geo::OGR::Geometry | SpatialFilter (array filter) |
public Geo::OSR::SpatialReference | SpatialReference (scalar name, Geo::OSR::SpatialReference sr) |
public method | StartTransaction () |
public method | SymDifference (Geo::OGR::Layer method, Geo::OGR::Layer result, hashref options, subref callback, scalar callback_data) |
public method | SyncToDisk () |
public scalar | TestCapability (scalar cap) |
public list | Tuple (array tuple) |
public method | Union (Geo::OGR::Layer method, Geo::OGR::Layer result, hashref options, subref callback, scalar callback_data) |
public method | Update (Geo::OGR::Layer method, Geo::OGR::Layer result, hashref options, subref callback, scalar callback_data) |
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 () |
A collection of similar features.
A layer object is typically obtained with a data source object. A layer has a data model (a schema), which is maintained in a definition object, and a set of features, which contain data according to the data model. The schema is typically set when the layer is created or opened, but it may be altered somewhat with methods Geo::OGR::Layer::CreateField, Geo::OGR::Layer::AlterFieldDefn, and Geo::OGR::Layer::DeleteField. Features and/or their data can be read, inserted and deleted. Reading can be filtered. Layers can be compared to each other with methods Clip, Erase, Identity, Intersection, SymDifference, Union, and Update.
public method Geo::OGR::Layer::AlterFieldDefn | ( | scalar | name, |
hash | params | ||
) |
field | the name of the field to be altered. |
params | as in Geo::OGR::FieldDefn::new. Width and Precision should be both or neither. |
public list Geo::OGR::Layer::Capabilities | ( | ) |
Both a class and an object method.
Examples:
public method Geo::OGR::Layer::Clip | ( | Geo::OGR::Layer | method, |
Geo::OGR::Layer | result, | ||
hashref | options, | ||
subref | callback, | ||
scalar | callback_data | ||
) |
Clip off areas that are not covered by the method layer. The schema of the result layer can be set before calling this method, or is initialized to to contain all fields from this and method layer.
method | method layer. |
result | result layer. |
options | a reference to an options hash. |
callback | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, callback_data) |
callback_data | [optional] |
public method Geo::OGR::Layer::CommitTransaction | ( | ) |
public method Geo::OGR::Layer::CreateFeature | ( | scalar | feature | ) |
Inserts a feature into the layer. The given feature's id may change.
feature | a Geo::OGR::Feature object |
public method Geo::OGR::Layer::CreateField | ( | hash | params | ) |
Create a field.
params | as in Geo::OGR::FieldDefn::new or Geo::OGR::GeomFieldDefn::new, plus ApproxOK (whose default is true). |
public method Geo::OGR::Layer::DataSource | ( | ) |
public method Geo::OGR::Layer::DeleteFeature | ( | scalar | fid | ) |
fid | feature id |
public method Geo::OGR::Layer::DeleteField | ( | scalar | field | ) |
Delete an existing field from a layer.
field | name (or index) of the field which is deleted |
public method Geo::OGR::Layer::Erase | ( | Geo::OGR::Layer | method, |
Geo::OGR::Layer | result, | ||
hashref | options, | ||
subref | callback, | ||
scalar | callback_data | ||
) |
The result layer contains features whose geometries represent areas that are in the input layer but not in the method layer. The features in the result layer have attributes from the input layer. The schema of the result layer can be set by the user or, if it is empty, is initialized to contain all fields in the input layer.
method | method layer. |
result | result layer. |
options | a reference to an options hash. |
callback | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, callback_data) |
callback_data | [optional] |
public method Geo::OGR::Layer::ForFeatures | ( | scalar | code, |
scalar | in_place | ||
) |
Call code for all features. This is a simple wrapper for ResetReading and while(GetNextFeature).
Example usage:
code | a reference to a subroutine, which is called with each feature as an argument |
in_place | if set to true, the feature is stored back to the layer |
public method Geo::OGR::Layer::ForGeometries | ( | scalar | code, |
scalar | in_place | ||
) |
Call code for all geometries. This is a simple wrapper for ResetReading and while(GetNextFeature).
Example usage:
code | a reference to a subroutine, which is called with each geometry as an argument |
in_place | if set to true, the geometry is stored back to the layer |
public method Geo::OGR::Layer::GeometryType | ( | ) |
public Geo::OGR::DataSource Geo::OGR::Layer::GetDataSource | ( | ) |
public Geo::OGR::FeatureDefn Geo::OGR::Layer::GetDefn | ( | ) |
public list Geo::OGR::Layer::GetExtent | ( | scalar | force = 1 | ) |
force | compute the extent even if it is expensive |
force |
public Geo::OGR::Feature Geo::OGR::Layer::GetFeature | ( | scalar | fid | ) |
fid | feature id |
public scalar Geo::OGR::Layer::GetFeatureCount | ( | scalar | force = 1 | ) |
force |
public scalar Geo::OGR::Layer::GetFeaturesRead | ( | ) |
public scalar Geo::OGR::Layer::GetFIDColumn | ( | ) |
public hash Geo::OGR::Layer::GetFieldDefn | ( | scalar | name | ) |
Get the definition of a field.
name | the name of the field. |
public list Geo::OGR::Layer::GetFieldNames | ( | ) |
public scalar Geo::OGR::Layer::GetName | ( | ) |
public Geo::OGR::Feature Geo::OGR::Layer::GetNextFeature | ( | ) |
public hash reference Geo::OGR::Layer::GetSchema | ( | ) |
Get the schema of this layer.
public Geo::OGR::Geometry Geo::OGR::Layer::GetSpatialFilter | ( | ) |
public method Geo::OGR::Layer::GetStyleTable | ( | ) |
public method Geo::OGR::Layer::Identity | ( | Geo::OGR::Layer | method, |
Geo::OGR::Layer | result, | ||
hashref | options, | ||
subref | callback, | ||
scalar | callback_data | ||
) |
The result layer contains features whose geometries represent areas that are in the input layer. The features in the result layer have attributes from both input and method layers. The schema of the result layer can be set by the user or, if it is empty, is initialized to contain all fields in input and method layers.
method | method layer. |
result | result layer. |
options | a reference to an options hash. |
callback | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, callback_data) |
callback_data | [optional] |
public method Geo::OGR::Layer::InsertFeature | ( | scalar | 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.
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) |
public method Geo::OGR::Layer::Intersection | ( | Geo::OGR::Layer | method, |
Geo::OGR::Layer | result, | ||
hashref | options, | ||
subref | callback, | ||
scalar | callback_data | ||
) |
The result layer contains features whose geometries represent areas that are common between features in the input layer and in the method layer. The schema of the result layer can be set before calling this method, or is initialized to contain all fields from this and method layer.
method | method layer. |
result | result layer. |
options | a reference to an options hash. |
callback | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, callback_data) |
callback_data | [optional] |
public method Geo::OGR::Layer::ReorderField | ( | ) |
public method Geo::OGR::Layer::ReorderFields | ( | ) |
public method Geo::OGR::Layer::ResetReading | ( | ) |
Initialize the layer object for iterative reading.
public method Geo::OGR::Layer::RollbackTransaction | ( | ) |
public hash reference Geo::OGR::Layer::Row | ( | hash | 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.
row | [optional] feature data |
public method Geo::OGR::Layer::SetAttributeFilter | ( | scalar | filter_string | ) |
Set or clear the attribute filter.
filter_string | a SQL WHERE clause or undef to clear the filter. |
public method Geo::OGR::Layer::SetFeature | ( | scalar | feature | ) |
Replaces a feature in the layer based on the given feature's id. Requires RandomWrite capability.
feature | a Geo::OGR::Feature object |
public method Geo::OGR::Layer::SetIgnoredFields | ( | array | fields | ) |
fields | a list of field names |
public method Geo::OGR::Layer::SetNextByIndex | ( | scalar | new_index | ) |
new_index | the index to which set the read cursor in the current iteration |
public method Geo::OGR::Layer::SetSpatialFilter | ( | scalar | filter | ) |
filter | [optional] a Geo::OGR::Geometry object. If not given, removes the filter if there is one. |
public method Geo::OGR::Layer::SetSpatialFilterRect | ( | scalar | minx, |
scalar | miny, | ||
scalar | maxx, | ||
scalar | maxy | ||
) |
minx | |
miny | |
maxx | |
maxy |
Code:
click to view
|
public method Geo::OGR::Layer::SetStyleTable | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Layer::SpatialFilter | ( | array | filter | ) |
filter | [optional] a Geo::OGR::Geometry object or a string. An undefined value removes the filter if there is one. |
filter | [optional] a rectangle ($minx, $miny, $maxx, $maxy). |
public Geo::OSR::SpatialReference Geo::OGR::Layer::SpatialReference | ( | scalar | name, |
Geo::OSR::SpatialReference | sr | ||
) |
name | [optional] a name of a spatial field in this layer. |
sr | [optional] a Geo::OSR::SpatialReference object, which replaces the existing projection. |
public method Geo::OGR::Layer::StartTransaction | ( | ) |
public method Geo::OGR::Layer::SymDifference | ( | Geo::OGR::Layer | method, |
Geo::OGR::Layer | result, | ||
hashref | options, | ||
subref | callback, | ||
scalar | callback_data | ||
) |
The result layer contains features whose geometries represent areas that are in either in the input layer or in the method layer but not in both. The features in the result layer have attributes from both input and method layers. For features which represent areas that are only in the input or in the method layer the respective attributes have undefined values. The schema of the result layer can be set by the user or, if it is empty, is initialized to contain all fields in the input and method layers.
method | method layer. |
result | result layer. |
options | a reference to an options hash. |
callback | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, callback_data) |
callback_data | [optional] |
public method Geo::OGR::Layer::SyncToDisk | ( | ) |
public scalar Geo::OGR::Layer::TestCapability | ( | scalar | cap | ) |
cap | A capability string. |
public list Geo::OGR::Layer::Tuple | ( | array | 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 expected data in the tuple is: ([feature id,] non-spatial fields, spatial fields). Calls Geo::OGR::Feature::Tuple.
tuple | [optional] feature data |
public method Geo::OGR::Layer::Union | ( | Geo::OGR::Layer | method, |
Geo::OGR::Layer | result, | ||
hashref | options, | ||
subref | callback, | ||
scalar | callback_data | ||
) |
The result layer contains features whose geometries represent areas that are in either in the input layer or in the method layer. The schema of the result layer can be set before calling this method, or is initialized to contain all fields from this and method layer.
method | method layer. |
result | result layer. |
options | a reference to an options hash. |
callback | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, callback_data) |
callback_data | [optional] |
public method Geo::OGR::Layer::Update | ( | Geo::OGR::Layer | method, |
Geo::OGR::Layer | result, | ||
hashref | options, | ||
subref | callback, | ||
scalar | callback_data | ||
) |
The result layer contains features whose geometries represent areas that are either in the input layer or in the method layer. The features in the result layer have areas of the features of the method layer or those ares of the features of the input layer that are not covered by the method layer. The features of the result layer get their attributes from the input layer. The schema of the result layer can be set by the user or, if it is empty, is initialized to contain all fields in the input layer.
method | method layer. |
result | result layer. |
options | a reference to an options hash. |
callback | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, callback_data) |
callback_data | [optional] |