Geo::Surface3pm
A surface description.
Usage
my $island = Geo::Surface->new($outer, $lake1, $lake2);
Inheritance
Geo::Surfaceis a Geo::Shape
Overview
In this context, a "surface" is defined as a single filled area with possible enclosures in one projection system.
Extends "DESCRIPTION" in Geo::Shape.
Methods
Extends "METHODS" in Geo::Shape.
Constructors
Extends "Constructors" in Geo::Shape.
- $obj->
new( <$surface | <$outer,$inner,...> >, %options )
- 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$outerpolygon of the surface, and the other are all$innerenclosures: 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--Defaultproj Geo::Shape see Geo::Proj::defaultProjection()- proj => LABEL
Attributes
Extends "Attributes" in Geo::Shape.
$obj->
|
Returns a LIST of enclosed polygons, converted to Geo::Line objects. |
|---|---|
$obj->
|
Returns the outer polygon as Geo::Line object. |
$obj->
|
Returns a LIST of enclosed Math::Polygon objects. |
$obj->
|
Returns the outer Math::Polygon. |
$obj->
|
Inherited, see "Attributes" in Geo::Shape |
$obj->
|
Inherited, see "Attributes" in Geo::Shape |
Projections
Extends "Projections" in Geo::Shape.
$obj->
|
Inherited, see "Projections" in Geo::Shape |
|---|---|
$obj->
|
Inherited, see "Projections" in Geo::Shape |
Geometry
Extends "Geometry" in Geo::Shape.
- $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() -
Inherited, see "Geometry" in Geo::Shape
- $obj->
bboxRing( [$xmin, $ymin, $xmax, $ymax, [$proj]] )
- Geo::Surface->
bboxRing( [$xmin, $ymin, $xmax, $ymax, [$proj]] ) -
Inherited, see "Geometry" in Geo::Shape
- $obj->
distance( $object, [$unit] ) -
Inherited, see "Geometry" in Geo::Shape
- $obj->
perimeter() -
The length of the outer polygon. Only useful in a orthogonal coordinate systems.
Display
Extends "Display" in Geo::Shape.
- $obj->
deg2dm($degrees, $pos, $neg)
- Geo::Surface->
deg2dm($degrees, $pos, $neg) -
Inherited, see "Display" in Geo::Shape
- $obj->
deg2dms($degrees, $pos, $neg)
- Geo::Surface->
deg2dms($degrees, $pos, $neg) -
Inherited, see "Display" in Geo::Shape
- $obj->
dms2deg($dms)
- Geo::Surface->
dms2deg($dms) -
Inherited, see "Display" in Geo::Shape
- $obj->
toString( [$projection] ) -
Returns a string representation of the line, which is also used for stringification.
Overload
Extends "OVERLOAD" in Geo::Shape.
overload: '""' (stringification)
|
Inherited, see "OVERLOAD" in Geo::Shape |
|---|---|
overload: 'bool' (truth value)
|
Inherited, see "OVERLOAD" in Geo::Shape |
Diagnostics
- 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
Releases
4 releases since Debian 7 (Wheezy); the text changed 3 times.