Geo-Point

 view release on metacpan or  search on metacpan

lib/Geo/Surface.pod  view on Meta::CPAN

=encoding utf8

=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 a single filled area with
possible enclosures in one projection system.

Extends L<"DESCRIPTION" in Geo::Shape|Geo::Shape/"DESCRIPTION">.
 
=head1 METHODS

Extends L<"METHODS" in Geo::Shape|Geo::Shape/"METHODS">.
 
=head2 Constructors

Extends L<"Constructors" in Geo::Shape|Geo::Shape/"Constructors">.
 
=over 4

=item $obj-E<gt>B<new>( <$surface | <$outer,$inner,...> >, %options )

=item Geo::Surface-E<gt>B<new>( <$surface | <$outer,$inner,...> >, %options )

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

=over 2

=item proj => LABEL

=back

=back

=head2 Attributes

Extends L<"Attributes" in Geo::Shape|Geo::Shape/"Attributes">.
 
=over 4

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

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

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

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

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

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

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

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

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

Inherited, see L<Geo::Shape/"Attributes">

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

Inherited, see L<Geo::Shape/"Attributes">

=back

=head2 Projections

Extends L<"Projections" in Geo::Shape|Geo::Shape/"Projections">.
 
=over 4

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

Inherited, see L<Geo::Shape/"Projections">

=item $obj-E<gt>B<projectOn>($nick, @points)

Inherited, see L<Geo::Shape/"Projections">

=back

=head2 Geometry

Extends L<"Geometry" in Geo::Shape|Geo::Shape/"Geometry">.
 
=over 4

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

Returns the area enclosed by the outer polygon, minus the erea of
the enclosures.  Only useful when the points are in some orthogonal
projection.

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

The bounding box of outer surface polygon.

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

Inherited, see L<Geo::Shape/"Geometry">

=item $obj-E<gt>B<bboxRing>( [$xmin, $ymin, $xmax, $ymax, [$proj]] )

=item Geo::Surface-E<gt>B<bboxRing>( [$xmin, $ymin, $xmax, $ymax, [$proj]] )

Inherited, see L<Geo::Shape/"Geometry">

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

Inherited, see L<Geo::Shape/"Geometry">

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

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



( run in 0.588 second using v1.01-cache-2.11-cpan-483215c6ad5 )