1Geo::ShapeFile::Point(3U)ser Contributed Perl DocumentatiGoeno::ShapeFile::Point(3)
2
3
4

NAME

6       Geo::ShapeFile::Point - Geo::ShapeFile utility class.
7

SYNOPSIS

9         use Geo::ShapeFile::Point;
10         use Geo::ShapeFile;
11
12         my $point = Geo::ShapeFile::Point->new(X => 12345, Y => 54321);
13

ABSTRACT

15         This is a utility class, used by Geo::ShapeFile.
16

DESCRIPTION

18       This is a utility class, used by Geo::ShapeFile to represent point
19       data, you should see the Geo::ShapeFile documentation for more
20       information.
21
22   EXPORT
23       Nothing.
24
25   IMPORT NOTE
26       This module uses overloaded operators to allow you to use == or eq to
27       compare two point objects.  By default points are considered to be
28       equal only if their X, Y, Z, and M attributes are equal.  If you want
29       to exclude the Z or M attributes when comparing, you should use
30       comp_includes_z or comp_includes_m when importing the object.  Note
31       that you must do this before you load the Geo::ShapeFile module, or it
32       will pass it's own arguments to import, and you will get the default
33       behavior:
34
35         DO:
36
37         use Geo::ShapeFile::Point comp_includes_m => 0, comp_includes_z => 0;
38         use Geo::ShapeFile;
39
40         DONT:
41
42         use Geo::ShapeFile;
43         use Geo::ShapeFile::Point comp_includes_m => 0, comp_includes_z => 0;
44         (Geo::ShapeFile already imported Point for you, so it has no effect here)
45

METHODS

47       new (X => $x, Y => $y)
48           Creates a new Geo::ShapeFile::Point object, takes a hash consisting
49           of X, Y, Z, and/or M values to be assigned to the point.
50
51       X() Y() Z() M()
52           Set/retrieve the X, Y, Z, or M values for this object.
53
54       get_x() get_y() get_z() get_m()
55           Get the X, Y, Z, or M values for this object.  Slightly faster than
56           the dual purpose set/retrieve methods so good for heavy usage parts
57           of your code.
58
59       x_min() x_max() y_min() y_max()
60       z_min() z_max() m_min() m_max()
61           These methods are provided for compatibility with
62           Geo::ShapeFile::Shape, but for points simply return the X, Y, Z, or
63           M coordinates as appropriate.
64
65       distance_from($point)
66           Returns the distance between this point and the specified point.
67           Only considers the two-dimensional distance.  Z and M values are
68           ignored.
69
70       angle_to($point);
71           Returns the bearing (in degrees from north) from this point to some
72           other point.  Returns 0 if the two points are in the same location.
73

REPORTING BUGS

75       Please send any bugs, suggestions, or feature requests to
76         <https://github.com/shawnlaffan/Geo-ShapeFile/issues>.
77

SEE ALSO

79       Geo::ShapeFile
80

AUTHOR

82       Jason Kohles, <email@jasonkohles.com>
83
84       Shawn Laffan, <shawnlaffan@gmail.com>
85
87       Copyright 2002-2013 by Jason Kohles
88
89       Copyright 2014-2023 by Shawn Laffan
90
91       This library is free software; you can redistribute it and/or modify it
92       under the same terms as Perl itself.
93
94
95
96perl v5.36.0                      2023-02-27          Geo::ShapeFile::Point(3)
Impressum