METHODS

Constructors

$obj->new( <$surface | <$outer,$inner,...> >, %options )
$class->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
» 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: not known what to do with $component

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 proj in Geo::Shape.
$obj->proj4
See proj4 in Geo::Shape.

Projections

$obj->in( <$label|'utm'> )
See in in Geo::Shape.
$obj->projectOn( $nick, @points )
See projectOn 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 bboxCenter in Geo::Shape.
$obj->bboxRing( [$xmin, $ymin, $xmax, $ymax, [$proj]] )
$class->bboxRing( [$xmin, $ymin, $xmax, $ymax, [$proj]] )
See bboxRing in Geo::Shape.
$obj->distance( $object, [$unit] )
See distance in Geo::Shape.
$obj->perimeter

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

Display

$obj->deg2dm( $degrees, $pos, $neg )
$class->deg2dm( $degrees, $pos, $neg )
See deg2dm in Geo::Shape.
$obj->deg2dms( $degrees, $pos, $neg )
$class->deg2dms( $degrees, $pos, $neg )
See deg2dms in Geo::Shape.
$obj->dms2deg( $dms )
$class->dms2deg( $dms )
See dms2deg in Geo::Shape.
$obj->toString( [$projection] )

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