Geo::Surface - A surface description.


Geo-Point documentation  | view source Contained in the Geo-Point distribution.

Index


NAME

Top

Geo::Surface - A surface description.

INHERITANCE

Top

 Geo::Surface
   is a Geo::Shape

SYNOPSIS

Top

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

DESCRIPTION

Top

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

METHODS

Top

Constructors

Geo::Surface->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 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 Geo::Line, 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

Attributes

$obj->geoInner

Returns a LIST of enclosed polygons, converted to Geo::Line objects.

$obj->geoOuter

Returns the outer polygon as Geo::Line object.

$obj->inner

Returns a LIST of enclosed Math::Polygon objects.

$obj->outer

Returns the outer Math::Polygon.

$obj->proj

See "Attributes" in Geo::Shape

$obj->proj4

See "Attributes" in Geo::Shape

Projections

$obj->in(LABEL|'utm')

See "Projections" in Geo::Shape

$obj->projectOn(NICK, POINTS)

See "Projections" in Geo::Shape

Geometry

$obj->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.

$obj->bbox

The bounding box of outer surface polygon.

$obj->bboxCenter

See "Geometry" in Geo::Shape

$obj->bboxRing([XMIN, YMIN, XMAX, YMAX, [PROJ]])

Geo::Surface->bboxRing([XMIN, YMIN, XMAX, YMAX, [PROJ]])

See "Geometry" in Geo::Shape

$obj->distance(OBJECT, [UNIT])

See "Geometry" in Geo::Shape

$obj->perimeter

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

Display

$obj->deg2dm(DEGREES, POS, NEG)

Geo::Surface->deg2dm(DEGREES, POS, NEG)

See "Display" in Geo::Shape

$obj->deg2dms(DEGREES, POS, NEG)

Geo::Surface->deg2dms(DEGREES, POS, NEG)

See "Display" in Geo::Shape

$obj->dms2deg(DMS)

Geo::Surface->dms2deg(DMS)

See "Display" in Geo::Shape

$obj->toString([PROJECTION])

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

DIAGNOSTICS

Top

Warning: Geo::Line is should be filled

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

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

Error: not known what to do with $component

SEE ALSO

Top

This module is part of Geo-Point distribution version 0.93, built on May 19, 2010. Website: http://perl.overmeer.net/geo/ All modules in this suite: Geo::Point, Geo::Proj4, Geo::WKT, Math::Polygon, Geo::GML, Geo::ISO19139, Geo::EOP, Geo::Format::Envisat, and Geo::Format::Landsat.

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

LICENSE

Top

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


Geo-Point documentation  | view source Contained in the Geo-Point distribution.