Create a new object.
Option | Default |
---|---|
proj |
Returns the nick of the projection used by the component.
The coordinates of this point in a certain projection, refered to with the LABEL. The projection is defined with new(). When simply 'utm' is provided, the best UTM zone is selected.
In LIST context, the coordinates are returned. In SCALAR context, a new object is returned.
my $gp = Geo::Point->latlong(1,2); # implicit conversion to wgs84, if not already in latlong my ($lat, $long) = $pr->latlong; # will select an utm zone for you my $p_utm = $gp->in('utm'); my ($x, $y) = $p_utm->xy; my $label = $p_utm->proj; my ($datum, $zone) = $label =~ m/^utm-(\w+)-(\d+)$/;
The POINTS are ARRAYS with each an X and Y coordinate of a single point in space. A list of transformed POINTS is returned, which is empty if no change is needed. The return list is preceeded by a projection NICK which is the result, usually the same as the provided NICK, but in some cases (for instance UTM) it may be different.
Returns the area covered by the geo structure. Points will return zero.
Returns the bounding box of the object as four coordinates, respectively xmin, ymin, xmax, ymax. The values are expressed in the coordinate system of the object.
Returns a Geo::Point which represent the middle of the object. It is the center of the bounding box. The values is cached, once computed.
Be warned that the central point in one projection system may be quite different from the central point in some other projectionsystem .
Calculate the distance between this object and some other object. For many combinations of objects this is not supported or only partially supported.
This calculation is performed with manual Geo::Distance in accurate mode.
The default UNIT is kilometers. Other units are provided in the manual
page of manual Geo::Distance. As extra unit, degrees
and radians
are
added as well as the km
alias for kilometer.
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.
Same object, maybe defined as different object, maybe in a different coordinate system. When the coordinate systems are equivalent, no conversions are done. Otherwise, the second OBJECT is converted into the coordinate system of the callee.
Returns the length of the outer border of the object's components. For points, this returns zero.