Scroll to navigation

Geo::Space(3pm) User Contributed Perl Documentation Geo::Space(3pm)

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.

Extends "DESCRIPTION" in Geo::Shape.

METHODS

Extends "METHODS" in Geo::Shape.

Constructors

Extends "Constructors" in Geo::Shape.
$obj->new( [$components], %options )
Geo::Space->new( [$components], %options )
When called as instance method, some defaults are copied from the object where the call is made upon. Usually called as class method.

$components are Math::Polygon, Math::Polygon::Surface, Geo::Point, Geo::Line, Geo::Surface, Geo::Space objects.

 -Option--Defined in--Default
  proj    Geo::Shape  see Geo::Proj::defaultProjection()
    
proj => LABEL

Attributes

Extends "Attributes" in Geo::Shape.
$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()
Inherited, see "Attributes" in Geo::Shape
$obj->proj4()
Inherited, see "Attributes" in Geo::Shape

Projections

Extends "Projections" in Geo::Shape.
$obj->in( <$label|'utm'> )
Inherited, see "Projections" in Geo::Shape
$obj->projectOn($nick, @points)
Inherited, see "Projections" in Geo::Shape

Geometry

Extends "Geometry" in Geo::Shape.
$obj->area()
Returns the area enclosed by the combined components. Only useful when the points are in some orthogonal projection.
$obj->bbox()
Inherited, see "Geometry" in Geo::Shape
$obj->bboxCenter()
Inherited, see "Geometry" in Geo::Shape
$obj->bboxRing( [$xmin, $ymin, $xmax, $ymax, [$proj]] )
Geo::Space->bboxRing( [$xmin, $ymin, $xmax, $ymax, [$proj]] )
Inherited, see "Geometry" in Geo::Shape
$obj->distance( $object, [$unit] )
Inherited, see "Geometry" in Geo::Shape
$obj->perimeter()
The length of the outer polygons of all components. Only useful in a orthogonal coordinate systems.

Display

Extends "Display" in Geo::Shape.
$obj->deg2dm($degrees, $pos, $neg)
Geo::Space->deg2dm($degrees, $pos, $neg)
Inherited, see "Display" in Geo::Shape
$obj->deg2dms($degrees, $pos, $neg)
Geo::Space->deg2dms($degrees, $pos, $neg)
Inherited, see "Display" in Geo::Shape
$obj->dms2deg($dms)
Geo::Space->dms2deg($dms)
Inherited, see "Display" in Geo::Shape
$obj->toString( [$projection] )
Returns a string representation of the line, which is also used for stringification.

example:

OVERLOAD

Extends "OVERLOAD" in Geo::Shape.
overload: '""' (stringification)
Inherited, see "OVERLOAD" in Geo::Shape
overload: 'bool' (truth value)
Inherited, see "OVERLOAD" in Geo::Shape

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.98, built on February 01, 2019. Website: http://perl.overmeer.net/CPAN/

LICENSE

Copyrights 2005-2019 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://dev.perl.org/licenses/

2019-02-21 perl v5.28.1