The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Geo::Space - A collection of various items

INHERITANCE

 Geo::Space
   is a Geo::Shape

SYNOPSIS

 my $island1 = Geo::Line->filled(...);
 my $island2 = Geo::Space->new(...);
 my $islands = Geo::Space->new($island1, $island2)

DESCRIPTION

Where a Geo::Surface can only contains sets of nested polygons, the Space can contain anything you like: lines, points, and unrelated polygons.

METHODS

Constructors

$obj->new([COMPONENTS], [OPTIONS])

Geo::Space->new([COMPONENTS], [OPTIONS])

Attributes

$obj->component(INDEX, [INDEX, ...])

    Returns the component (or components) with the specified INDEX(es). One Geo::Shape object in scalar context, and multiple in list context.

$obj->components

    Returns a list of Geo::Shape objects, all located in this space.

$obj->lines

    Returns a list of Geo::Line objects, which are defined as separate components.

$obj->nrComponents

    Returns the number of components.

$obj->onlyLines

    Returns true when all components are lines; Geo::Line objects.

$obj->onlyPoints

    Returns true when all components are points; Geo::Point objects.

$obj->onlyRings

    Returns true when all components are closed lines; Geo::Line objects each defined as ring.

$obj->points

    Returns a list of Geo::Point objects, which are defined as separate components.

$obj->proj

$obj->proj4

Projections

$obj->in(LABEL|'utm')

$obj->projectOn(NICK, POINTS)

Geometry

$obj->area

    Returns the area enclosed by the combined components. Only useful when the points are in some orthogonal projection.

$obj->bbox

$obj->bboxCenter

$obj->bboxRing([XMIN, YMIN, XMAX, YMAX, [PROJ]])

Geo::Space->bboxRing([XMIN, YMIN, XMAX, YMAX, [PROJ]])

$obj->distance(OBJECT, [UNIT])

$obj->perimeter

    The length of the outer polygons of all components. Only useful in a orthogonal coordinate systems.

Display

$obj->deg2dm(DEGREES, POS, NEG)

Geo::Space->deg2dm(DEGREES, POS, NEG)

$obj->deg2dms(DEGREES, POS, NEG)

Geo::Space->deg2dms(DEGREES, POS, NEG)

$obj->dms2deg(DMS)

Geo::Space->dms2deg(DMS)

$obj->toString([PROJECTION])

    Returns a string representation of the line, which is also used for stringification.

    example:

DIAGNOSTICS

Error: distance calculation not implemented between a $kind and a $kind

    Only a subset of all objects can be used in the distance calculation. The limitation is purely caused by lack of time to implement this.

Error: in() not implemented for a $class

SEE ALSO

This module is part of Geo-Point distribution version 0.93, built on May 19, 2010. Website: http://perl.overmeer.net/geo/ All modules in this suite: "Geo::Point", "Geo::Proj4", "Geo::WKT", "Math::Polygon", "Geo::GML", "Geo::ISO19139", "Geo::EOP", "Geo::Format::Envisat", and "Geo::Format::Landsat".

Please post questions or ideas to the mailinglist at http://geo-perl@list.hut.fi

LICENSE

Copyrights 2005-2010 by Mark Overmeer. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html