=head1 NAME

Geo::Space - A collection of various  items

=head1 INHERITANCE

 Geo::Space
   is a Geo::Shape

=head1 SYNOPSIS

 !!!! very ALPHA code, see README !!!!
 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

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

Geo::Space-E<gt>B<new>([COMPONENTS], [OPTIONS])

=over 4

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()

. proj LABEL

=back

=head2 Attributes

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

=over 4

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.

=back

$obj-E<gt>B<components>

=over 4

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

=back

$obj-E<gt>B<lines>

=over 4

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

=back

$obj-E<gt>B<nrComponents>

=over 4

Returns the number of components.

=back

$obj-E<gt>B<onlyLines>

=over 4

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

=back

$obj-E<gt>B<onlyPoints>

=over 4

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

=back

$obj-E<gt>B<onlyRings>

=over 4

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

=back

$obj-E<gt>B<points>

=over 4

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

=back

$obj-E<gt>B<proj>

=over 4

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

=back

=head2 Projections

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

=over 4

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

=back

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

=over 4

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

=back

=head2 Geometry

$obj-E<gt>B<area>

=over 4

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

=back

$obj-E<gt>B<bbox>

=over 4

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

=back

$obj-E<gt>B<bboxCenter>

=over 4

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

=back

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

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

=over 4

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

=back

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

=over 4

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

=back

$obj-E<gt>B<equal>(OTHER, [TOLERANCE])

=over 4

Detailed calculation whether two spaces are equal is a lot of
work.  Therefore, only exactly equal spaces are considered equivalent:
even the order of the components must be the same.

=back

$obj-E<gt>B<perimeter>

=over 4

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

=back

$obj-E<gt>B<sameAs>(OTHER, TOLERANCE)

=over 4

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

=back

=head2 Display

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

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

=over 4

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

=back

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

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

=over 4

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

=back

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

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

=over 4

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

=back

$obj-E<gt>B<string>([PROJECTION])

=over 4

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

I<Example:> 

=back

=head1 DIAGNOSTICS

I<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.

I<Error:> in() not implemented for a $class

=head1 SEE ALSO

This module is part of Geo-Point distribution version 0.05,
built on March 09, 2007. Website: F<http://perl.overmeer.net/geo/>

=head1 LICENSE

Copyrights 2005-2007 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>

