NAME
Image::GeoTIFF::Tiled::ShapePart
DESCRIPTION
This class is used by Image::GeoTIFF::Tiled::Shape to represent a single "part" of a shape (a line between two points), shapes being made up of multiple parts.
Whenever the start or end points are set, the linear interpolation along integer y-values are calculated and stored. Interpolation is done at the middle of the pixel latitude.
METHODS
CONSTRUCTOR
- new($start,$end)
-
Starting and ending points are required during construction. Points are 2D array references [ $x, $y ].
ACCESSORS
- start
-
Returns, optionally sets, the starting point. Setting causes the intermediate points between the ending point to be re-interpolated and therefore shouldn't be done.
- end
-
Returns, optionally sets, the ending point. Setting causes the intermediate points between the starting point to be re-interpolated and therefore shouldn't be done.
- upper
-
Returns the start or end point, whichever has the smaller latitude.
- lower
-
Returns the start or end point, whichever has the larger latitude.
- str
-
Returns a string representation of the object (debugging only).
GET POINTS
- get_point($y)
-
Returns the [ $x, $y ] interpolated point located at (integer) pixel latitude $y, or
undef
if there's no point along the given $y. - get_x($y)
-
Returns just the $x value of
get_point
, orundef
if there's no point along the given $y.
COPYRIGHT & LICENSE
Copyright 2010 Blake Willmarth.
This program is free software; you can redistribute it and/or modify it under the terms of either:
the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
the Artistic License version 2.0.