Geoinformatica  0.90
Geo::Vector Class Reference

A geospatial layer that consists of Geo::OGR::Features. More...

+ Collaboration diagram for Geo::Vector:

Static Public Attributes

static hash EXPORT_TAGS
 
static scalar AUTOLOAD
 

Detailed Description

A geospatial layer that consists of Geo::OGR::Features.

This module should be discussed in https://list.hut.fi/mailman/listinfo/geo-perl

The homepage of this module is https://github.com/ajolma/geoinformatica

Author
Ari Jolma
Copyright (c) 2005- by Ari Jolma
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

NAME

Geo::Vector - Perl extension for geospatial vectors

The <a href="<a href="http://geoinformatics.aalto.fi/doc/Geoinformatica/html/">http://geoinformatics.aalto.fi/doc/Geoinformatica/html/</a>">documentation of Geo::Vector</a> is in doxygen format.

tell dynaloader to load this module so that xs functions are available to all:

call Geo::OGR::Layer method as a fallback

()

Returns a list of valid geometry types.

Returns
a list of valid geometry types (as strings).

()

Returns a list of valid render as modes.

Returns
a list of valid render as modes (as strings).

ref ($driver, $data_source)

Lists the layers that are available in a data source.

Returns
A reference to a list of references of layer data in tuples

void delete_layer($driver, $data_source, $layer)

Attempts to delete a layer from a datasource.

Parameters
[in]driver
[in]data_source
[in]layerName of the layer that should be deleted.

($driver, $data_source, $layer)

Describes a layer in a data source.

Returns
Meta data and schema of the layer

Geo::Vector new($data_source)

Create a new Geo::Vector object for the first layer in a given OGR data souce.

An example of creating a Geo::Vector object for a ESRI shapefile:

$v = Geo::Vector->new("borders.shp");
Parameters
data_sourceAn OGR data source string
Returns
A new Geo::Vector object

Geo::Vector new(params)

Create a new Geo::Vector object.

A Geo::Vector object is either a wrapped Geo::OGR::Layer or a collection of Geo::OGR::Feature objects. Without any parameters an empty OGR memory layer without any attributes is created. A feature collection object does not have a unique schema.

Parameters
paramsNamed parameters, all are optional: (see also the named parameters of the Geo::Vector::layer method)
  • driver => string Name of the OGR driver for creating or opening a data source. If not given, an attempt is made to open the data source using the data source parameter.
  • create_options => reference to a hash of data source creation options. May be empty. Forwarded to Geo::OGR::CreateDataSource. Required to create other than memory data sources.
  • data_source => string OGR data source to create or open. Opening a data source is first attempted unless create_options is given. If open fails, creation is attempted.
  • open => string The layer to open.
  • update => boolean Set true if open in update mode.
  • layer => string [deprecated] Same as open.
  • create => string The layer to create.
  • layer_options forwarded to Geo::OGR::DataSource::CreateLayer.
  • SQL => string SQL-string, forwarded to Geo::OGR::DataSource::ExecuteSQL. An alternative to open and create.
  • geometry_type => string The geometry type for the new layer. Default is 'Unknown'.
  • schema, as in method Geo::Vector::schema.
  • srs => either a string which defines a spatial reference system (e.g. 'EPSG:XXXX') or a Geo::OSR::SpatialReference object. The srs for the new layer. Default is 'EPSG:4326'.
  • features => a reference to a list of features to be inserted into the collection. May be empty. If given, the resulting object is a feature collection object, and not an OGR layer.
  • geometries => a reference to a list of geometries to be inserted as new features into the collection. Creates features without attributes for the geometries. May be empty. If given, the resulting object is a feature collection object, and not an OGR layer. Do not mix with features.
Returns
A new Geo::Vector object

SEE ALSO

Geo::GDAL

This module should be discussed in https://list.hut.fi/mailman/listinfo/geo-perl

The homepage of this module is https://github.com/ajolma/geoinformatica

AUTHOR

Ari Jolma, <ari.jolma at aalto.fi>

COPYRIGHT AND LICENSE

Copyright (C) 2005-2006 by Ari Jolma

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

Definition at line 176 of file Vector.pm.

Member Data Documentation

public method Geo::Vector::AUTOLOAD
static

Undocumented Method

Code:
click to view

Definition at line 183 of file Vector.pm.


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