=head1 NAME

Geo::Surface - A surface description.

=head1 INHERITANCE

 Geo::Surface
   is a Geo::Shape

=head1 SYNOPSIS

 my $island = Geo::Surface->new($outer, $lake1, $lake2);

=head1 DESCRIPTION

In this context, a "surface" is defined as one filled area with
possible enclosures in one projection system.

=head1 METHODS

=head2 Constructors

Geo::Surface-E<gt>B<new>((SURFACE|(OUTER,INNER,...)), [OPTIONS])

=over 4

When called as instance method, some defaults are copied from the
object where the call is made upon.

You may either provide a L<Math::Polygon::Surface|Math::Polygon::Surface> SURFACE, or a LIST
of lines.  In the latter case, the first line is the OUTER polygon of
the surface, and the other are all INNER enclosures: lakes.  Lines
are and L<Geo::Line|Geo::Line>, L<Math::Polygon|Math::Polygon> objects, or ARRAY of points.

If no projection is specified, then the projection of the first
Geo-encoded line will be used.

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

. proj => LABEL

=back

=head2 Attributes

$obj-E<gt>B<geoInner>

=over 4

Returns a LIST of enclosed polygons, converted to L<Geo::Line|Geo::Line> objects.

=back

$obj-E<gt>B<geoOuter>

=over 4

Returns the outer polygon as L<Geo::Line|Geo::Line> object.

=back

$obj-E<gt>B<inner>

=over 4

Returns a LIST of enclosed L<Math::Polygon|Math::Polygon> objects.

=back

$obj-E<gt>B<outer>

=over 4

Returns the outer L<Math::Polygon|Math::Polygon>.

=back

$obj-E<gt>B<proj>

=over 4

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

=back

$obj-E<gt>B<proj4>

=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 outer polygon, minus the erea of
the enclosures.  Only useful when the points are in some orthogonal
projection.

=back

$obj-E<gt>B<bbox>

=over 4

The bounding box of outer surface polygon.

=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::Surface-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<perimeter>

=over 4

The length of the outer polygon. Only useful in a orthogonal
coordinate systems.

=back

=head2 Display

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

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

=over 4

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

=back

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

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

=over 4

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

=back

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

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

=over 4

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

=back

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

=over 4

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

=back

=head1 DIAGNOSTICS

Warning: Geo::Line is should be filled

=over 4

When L<Geo::Line|Geo::Line> objects are used to compose a surface, each of them
must be filled.  Representation of rivers and such do not belong in a
surface description.

=back

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

=over 4

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.

=back

Error: in() not implemented for a $class

=over 4

=back

Error: not known what to do with $component

=over 4

=back

=head1 SEE ALSO

This module is part of Geo-Point distribution version 0.93,
built on May 19, 2010. 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-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 F<http://www.perl.com/perl/misc/Artistic.html>

