| 1 | package Geo::GoogleEarth::Pluggable::Contrib::Point; | ||||||||||||
| 2 | 5 | ▶ | use base qw{Geo::GoogleEarth::Pluggable::Placemark}; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 5 | ▶ | use XML::LibXML::LazyBuilder qw{E}; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 5 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 5 | our $VERSION='0.17'; | |||||||||||
| 8 | |||||||||||||
| 9 | =head1 NAME | ||||||||||||
| 10 | |||||||||||||
| 11 | Geo::GoogleEarth::Pluggable::Contrib::Point - Geo::GoogleEarth::Pluggable Point Object | ||||||||||||
| 12 | |||||||||||||
| 13 | =head1 SYNOPSIS | ||||||||||||
| 14 | |||||||||||||
| 15 | use Geo::GoogleEarth::Pluggable; | ||||||||||||
| 16 | my $document=Geo::GoogleEarth::Pluggable->new(); | ||||||||||||
| 17 | $document->Point(); | ||||||||||||
| 18 | |||||||||||||
| 19 | =head1 DESCRIPTION | ||||||||||||
| 20 | |||||||||||||
| 21 | Geo::GoogleEarth::Pluggable::Contrib::Point is a L<Geo::GoogleEarth::Pluggable::Placemark> with a few other methods. | ||||||||||||
| 22 | |||||||||||||
| 23 | =head1 USAGE | ||||||||||||
| 24 | |||||||||||||
| 25 | my $placemark=$document->Point(name=>"Point Name", | ||||||||||||
| 26 | lat=>$lat, | ||||||||||||
| 27 | lon=>$lon, | ||||||||||||
| 28 | alt=>$alt); | ||||||||||||
| 29 | |||||||||||||
| 30 | =head1 CONSTRUCTOR | ||||||||||||
| 31 | |||||||||||||
| 32 | =head2 new | ||||||||||||
| 33 | |||||||||||||
| 34 | my $placemark=$document->Point( | ||||||||||||
| 35 | name => "White House", | ||||||||||||
| 36 | lat => 38.89769, #signed decimal degrees WGS-84 | ||||||||||||
| 37 | lon => -77.036549, #signed decimal degrees WGS-84 | ||||||||||||
| 38 | alt => 30, #meters above ellipsoid WGS-84 | ||||||||||||
| 39 | ); | ||||||||||||
| 40 | |||||||||||||
| 41 | =head1 METHODS | ||||||||||||
| 42 | |||||||||||||
| 43 | =head2 subnode | ||||||||||||
| 44 | |||||||||||||
| 45 | =cut | ||||||||||||
| 46 | |||||||||||||
| 47 | 3 | ▶ | sub subnode { | ||||||||||
|
Subroutine
subnode: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 48 | 3 | my $self=shift; | |||||||||||
| 49 | 3 | my $coordinates=join(",", $self->lon+0, $self->lat+0, $self->alt+0); | |||||||||||
| 50 | 3 | return E(Point=>{}, E(coordinates=>{}, $coordinates)); | |||||||||||
| 51 | } | ||||||||||||
| 52 | |||||||||||||
| 53 | =head2 lat | ||||||||||||
| 54 | |||||||||||||
| 55 | Sets or returns latitude. The format is signed decimal degrees WGS-84. | ||||||||||||
| 56 | |||||||||||||
| 57 | my $lat=$placemark->lat; | ||||||||||||
| 58 | |||||||||||||
| 59 | =cut | ||||||||||||
| 60 | |||||||||||||
| 61 | 3 | ▶ | sub lat { | ||||||||||
|
Subroutine
lat: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||
| 62 | 3 | my $self=shift; | |||||||||||
| 63 | 3 | ▶ | $self->{'lat'}=shift if @_; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 64 | 3 | return $self->{'lat'}; | |||||||||||
| 65 | } | ||||||||||||
| 66 | |||||||||||||
| 67 | =head2 lon | ||||||||||||
| 68 | |||||||||||||
| 69 | Sets or returns longitude. The format is signed decimal degrees WGS-84. | ||||||||||||
| 70 | |||||||||||||
| 71 | my $lon=$placemark->lon; | ||||||||||||
| 72 | |||||||||||||
| 73 | =cut | ||||||||||||
| 74 | |||||||||||||
| 75 | 3 | ▶ | sub lon { | ||||||||||
|
Subroutine
lon: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||
| 76 | 3 | my $self=shift; | |||||||||||
| 77 | 3 | ▶ | $self->{'lon'}=shift if @_; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 78 | 3 | return $self->{'lon'}; | |||||||||||
| 79 | } | ||||||||||||
| 80 | |||||||||||||
| 81 | =head2 alt | ||||||||||||
| 82 | |||||||||||||
| 83 | Sets or returns altitude. The units are meters above the ellipsoid WGS-84. | ||||||||||||
| 84 | |||||||||||||
| 85 | my $alt=$placemark->alt; | ||||||||||||
| 86 | |||||||||||||
| 87 | Typically, Google Earth "snaps" Placemarks to the surface regardless of how the altitude is set. | ||||||||||||
| 88 | |||||||||||||
| 89 | =cut | ||||||||||||
| 90 | |||||||||||||
| 91 | 3 | ▶ | sub alt { | ||||||||||
|
Subroutine
alt: called CC=3 SCAR=11.4
Pod
documented
| |||||||||||||
| 92 | 3 | my $self=shift; | |||||||||||
| 93 | 3 | ▶ | $self->{'alt'}=shift if @_; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 94 | 3 | ▶ | $self->{'alt'}||=0; | ||||||||||
|
Condition50%1/2
$self->{"alt"} ||= 0
MC/DC0%0/1
$self->{"alt"} ||= 0
$self->{"alt"}
Truth table50%1/2
A
A= $self->{"alt"}
| |||||||||||||
| 95 | 3 | return $self->{'alt'}; | |||||||||||
| 96 | } | ||||||||||||
| 97 | |||||||||||||
| 98 | =head1 BUGS | ||||||||||||
| 99 | |||||||||||||
| 100 | Please log on RT and send to the geo-perl email list. | ||||||||||||
| 101 | |||||||||||||
| 102 | =head1 SUPPORT | ||||||||||||
| 103 | |||||||||||||
| 104 | DavisNetworks.com supports all Perl applications including this package. | ||||||||||||
| 105 | |||||||||||||
| 106 | =head1 AUTHOR | ||||||||||||
| 107 | |||||||||||||
| 108 | Michael R. Davis (mrdvt92) | ||||||||||||
| 109 | CPAN ID: MRDVT | ||||||||||||
| 110 | |||||||||||||
| 111 | =head1 COPYRIGHT | ||||||||||||
| 112 | |||||||||||||
| 113 | This program is free software licensed under the... | ||||||||||||
| 114 | |||||||||||||
| 115 | The BSD License | ||||||||||||
| 116 | |||||||||||||
| 117 | The full text of the license can be found in the LICENSE file included with this module. | ||||||||||||
| 118 | |||||||||||||
| 119 | =head1 SEE ALSO | ||||||||||||
| 120 | |||||||||||||
| 121 | L<Geo::GoogleEarth::Pluggable>, L<XML::LibXML::LazyBuilder>, L<Geo::GoogleEarth::Pluggable::Placemark> | ||||||||||||
| 122 | |||||||||||||
| 123 | =cut | ||||||||||||
| 124 | |||||||||||||
| 125 | 5 | 1; | |||||||||||