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

Geo::Space - A collection of various  items

=head1 INHERITANCE

 Geo::Space
   is a Geo::Shape

=head1 SYNOPSIS

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

=head1 DESCRIPTION

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

=head1 METHODS

=head2 Constructors

=over 4

=item $obj-E<gt>B<new>([COMPONENTS], [OPTIONS])

=item Geo::Space-E<gt>B<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 L<Math::Polygon|Math::Polygon>, L<Math::Polygon::Surface|Math::Polygon::Surface>,
L<Geo::Point|Geo::Point>, L<Geo::Line|Geo::Line>, L<Geo::Surface|Geo::Surface>, L<Geo::Space|Geo::Space> objects.

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

=over 2

=item proj => LABEL

=back

=back

=head2 Attributes

=over 4

=item $obj-E<gt>B<component>(INDEX, [INDEX, ...])

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

=item $obj-E<gt>B<components>()

Returns a list of L<Geo::Shape|Geo::Shape> objects, all located in this space.

=item $obj-E<gt>B<lines>()

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

=item $obj-E<gt>B<nrComponents>()

Returns the number of components.

=item $obj-E<gt>B<onlyLines>()

Returns true when all components are lines; L<Geo::Line|Geo::Line> objects.

=item $obj-E<gt>B<onlyPoints>()

Returns true when all components are points; L<Geo::Point|Geo::Point> objects.

=item $obj-E<gt>B<onlyRings>()

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

=item $obj-E<gt>B<points>()

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

=item $obj-E<gt>B<proj>()

See L<Geo::Shape/"Attributes">

=item $obj-E<gt>B<proj4>()

See L<Geo::Shape/"Attributes">

=back

=head2 Projections

=over 4

=item $obj-E<gt>B<in>(LABEL|'utm')

See L<Geo::Shape/"Projections">

=item $obj-E<gt>B<projectOn>(NICK, POINTS)

See L<Geo::Shape/"Projections">

=back

=head2 Geometry

=over 4

=item $obj-E<gt>B<area>()

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

=item $obj-E<gt>B<bbox>()

See L<Geo::Shape/"Geometry">

=item $obj-E<gt>B<bboxCenter>()

See L<Geo::Shape/"Geometry">

=item $obj-E<gt>B<bboxRing>([XMIN, YMIN, XMAX, YMAX, [PROJ]])

=item Geo::Space-E<gt>B<bboxRing>([XMIN, YMIN, XMAX, YMAX, [PROJ]])

See L<Geo::Shape/"Geometry">

=item $obj-E<gt>B<distance>(OBJECT, [UNIT])

See L<Geo::Shape/"Geometry">

=item $obj-E<gt>B<perimeter>()

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

=back

=head2 Display

=over 4

=item $obj-E<gt>B<deg2dm>(DEGREES, POS, NEG)

=item Geo::Space-E<gt>B<deg2dm>(DEGREES, POS, NEG)

See L<Geo::Shape/"Display">

=item $obj-E<gt>B<deg2dms>(DEGREES, POS, NEG)

=item Geo::Space-E<gt>B<deg2dms>(DEGREES, POS, NEG)

See L<Geo::Shape/"Display">

=item $obj-E<gt>B<dms2deg>(DMS)

=item Geo::Space-E<gt>B<dms2deg>(DMS)

See L<Geo::Shape/"Display">

=item $obj-E<gt>B<toString>([PROJECTION])

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

example: 

=back

=head1 OVERLOAD

=over 4

=item overload: B<'""' (stringification)>()

See L<Geo::Shape/"OVERLOAD">

=item overload: B<'bool' (truth value)>()

See L<Geo::Shape/"OVERLOAD">

=back

=head1 DIAGNOSTICS

=over 4

=item 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.

=item Error: in() not implemented for a $class

=back

=head1 SEE ALSO

This module is part of Geo-Point distribution version 0.94,
built on December 21, 2012. Website: F<http://perl.overmeer.net/geo/>
All modules in this suite:
L</Geo::Point>,
L</Geo::Proj4>,
L</Geo::WKT>,
L</Math::Polygon>,
L</Geo::GML>,
L</Geo::ISO19139>,
L</Geo::EOP>,
L</Geo::Format::Envisat>, and
L</Geo::Format::Landsat>.

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

=head1 LICENSE

Copyrights 2005-2012 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 F<http://www.perl.com/perl/misc/Artistic.html>