Geo-GoogleEarth-Pluggable-0.17/ 0000755 0001750 0001750 00000000000 14130060237 015575 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/scripts/ 0000755 0001750 0001750 00000000000 14130060237 017264 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-LinearRing.pl 0000644 0001750 0001750 00000001264 14051753662 026501 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-LinearRing.pl - Geo::GoogleEarth::Pluggable LinearRing Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Document");
my @pt=(
{lat=>38.5, lon=>-77.1},
{lat=>38.6, lon=>-77.2},
{lat=>38.7, lon=>-77.2},
{lat=>38.8, lon=>-77.1},
);
push @pt, $pt[0]; #ring last = first
$document->LinearRing(name=>"My LinearRing", coordinates=>\@pt);
#use Data::Dumper qw{Dumper};
#print Dumper($document->structure);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-Folders_with_Points.pl 0000644 0001750 0001750 00000001407 14051753662 030433 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-Folders_with_Points.pl - Geo-GoogleEarth-Pluggable Folders and Points Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(
name=>"My Document",
description=>q{"this" is > 'that' & < the other %22.},
);
foreach my $f (3,4,5,6) {
my $folder=$document->Folder(name=>"My Folder $f", description=>"F$f Desc");
my $point=$folder->Point(name=>"My Point $f", lat=>"39.$f", lon=>"-77.$f", description=>"
Point: $f
");
}
#use Data::Dumper qw{Dumper};
#print Dumper($document->structure);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-LineString.pl 0000644 0001750 0001750 00000001216 14051753662 026522 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-LineString.pl - Geo::GoogleEarth::Pluggable LineString Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Document");
my @pt=(
{lat=>38.1, lon=>-77.1},
{lat=>38.2, lon=>-77.2},
{lat=>38.3, lon=>-77.2},
{lat=>38.4, lon=>-77.1},
);
$document->LineString(name=>"My LineString", coordinates=>\@pt);
#use Data::Dumper qw{Dumper};
#print Dumper($document->structure);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-Point.pl 0000644 0001750 0001750 00000000736 14051753662 025543 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-Point.pl - Geo::GoogleEarth::Pluggable Point Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Document");
$document->Point(name=>"My Name", lat=>39, lon=>-77);
#use Data::Dumper qw{Dumper};
#print Dumper($document->structure);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-Snippet.pl 0000644 0001750 0001750 00000001402 14051753662 026063 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-Snippet.pl - Geo-GoogleEarth-Pluggable Snippet Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Document Name", Snippet=>"My Document Snippet");
my $folder=$document->Folder(name=>"My Folder Name", Snippet=>"My Folder Snippet");
my $point=$folder->Point(
lat => 38.89767,
lon => -77.03655,
name => "White House",
Snippet => ["1600 Pennsylvania Avenue NW", "Washington, DC 20500"],
);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-Point-StyleIcon.pl 0000644 0001750 0001750 00000001764 14051753662 027454 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
use DateTime;
=head1 NAME
Geo-GoogleEarth-Pluggable-Point-StyleIcon.pl - Geo-GoogleEarth-Pluggable Icon Style Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>sprintf("Style Example - %s", DateTime->now));
my $IconStyleBlueDot=$document->IconStyle( #This is also simply IconStyleBlueDot()
color => {red=>0, green=>0, blue=>192},
scale => 1.2,
href => "http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png",
hotSpot => {x=>20,y=>2,xunits=>"pixels",yunits=>"pixels"},
);
my $point=$document->Point(
name => "Blue Point",
lat => 39.1,
lon => -77.1,
style => $IconStyleBlueDot,
);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-Point-StyleMapIcon.pl 0000644 0001750 0001750 00000002563 14051753662 030110 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-Point-StyleMapIcon.pl - Geo-GoogleEarth-Pluggable Icon StyleMap Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>"StyleMap Example");
my $style1=$document->IconStyle(
color => {red=>0, green=>0, blue=>192},
href => "http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png",
);
my $style2=$document->IconStyle(
color => {red=>0, green=>192, blue=>0},
href => "http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png",
);
my $stylemap=$document->StyleMap(normal=>$style1, highlight=>$style2);
$document->Point(
name => "Style1 Point",
lat => 38.893873,
lon => -77.037579,
style => $style1,
);
$document->Point(
name => "StyleMap Point",
lat => 38.893873,
lon => -77.036579,
style => $stylemap,
);
$document->Point(
name => "Style2 Point",
lat => 38.893873,
lon => -77.035579,
style => $style2,
);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-MultiPoint.pl 0000644 0001750 0001750 00000001077 14051753662 026555 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-MultiPoint.pl - Geo::GoogleEarth::Pluggable MultiPoint Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Document");
my @point=();
foreach my $lat (39000 .. 39005) {
foreach my $lon (-77005 .. -77000) {
push @point, {lat=>$lat/1000, lon=>$lon/1000};
}
}
$document->MultiPoint(name=>"My Name", coordinates=>\@point);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/generate-kml.pl 0000644 0001750 0001750 00000000635 14051753662 022215 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
=head1 NAME
generate-kml.pl - Generates all of the KML and KMZ files for the example scripts.
=cut
my $lint="";
$lint=" | /usr/bin/xmllint --format - " if -x "/usr/bin/xmllint";
while (my $file=shift) {
next unless -r $file;
printf "Running: %s\n", $file;
print qx{perl -Mblib $file kml $lint > "$file.kml"};
print qx{perl -Mblib $file kmz > "$file.kmz"};
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-NetworkLink.pl 0000644 0001750 0001750 00000001060 14051753662 026710 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-Folder.pl - Geo-GoogleEarth-Pluggable Folder Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Document", Snippet=>"The KMZ version is more interesting.");
$document->NetworkLink(name=>"My NetworkLink", url=>"doc.kml", Snippet=>"My Snippet");
#use Data::Dumper qw{Dumper};
#print Dumper($document->structure);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/scripts/Geo-GoogleEarth-Pluggable-Folder.pl 0000644 0001750 0001750 00000000752 14051753662 025663 0 ustar mdavis mdavis #!/usr/bin/perl
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable;
=head1 NAME
Geo-GoogleEarth-Pluggable-Folder.pl - Geo-GoogleEarth-Pluggable Folder Example
=cut
my $type=shift || "kml";
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Document");
$document->Folder(name=>"My Name", description=>"My Description");
#use Data::Dumper qw{Dumper};
#print Dumper($document->structure);
if ($type eq "kmz") {
print $document->archive;
} else {
print $document->render;
}
Geo-GoogleEarth-Pluggable-0.17/lib/ 0000755 0001750 0001750 00000000000 14130060237 016343 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/lib/Geo/ 0000755 0001750 0001750 00000000000 14130060237 017055 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/ 0000755 0001750 0001750 00000000000 14130060237 021255 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/ 0000755 0001750 0001750 00000000000 14130060237 023157 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Contrib/ 0000755 0001750 0001750 00000000000 14130060237 024557 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Contrib/Point.pm 0000644 0001750 0001750 00000005017 14130057555 026222 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Contrib::Point;
use base qw{Geo::GoogleEarth::Pluggable::Placemark};
use XML::LibXML::LazyBuilder qw{E};
use warnings;
use strict;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Contrib::Point - Geo::GoogleEarth::Pluggable Point Object
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new();
$document->Point();
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::Contrib::Point is a L with a few other methods.
=head1 USAGE
my $placemark=$document->Point(name=>"Point Name",
lat=>$lat,
lon=>$lon,
alt=>$alt);
=head1 CONSTRUCTOR
=head2 new
my $placemark=$document->Point(
name => "White House",
lat => 38.89769, #signed decimal degrees WGS-84
lon => -77.036549, #signed decimal degrees WGS-84
alt => 30, #meters above ellipsoid WGS-84
);
=head1 METHODS
=head2 subnode
=cut
sub subnode {
my $self=shift;
my $coordinates=join(",", $self->lon+0, $self->lat+0, $self->alt+0);
return E(Point=>{}, E(coordinates=>{}, $coordinates));
}
=head2 lat
Sets or returns latitude. The format is signed decimal degrees WGS-84.
my $lat=$placemark->lat;
=cut
sub lat {
my $self=shift;
$self->{'lat'}=shift if @_;
return $self->{'lat'};
}
=head2 lon
Sets or returns longitude. The format is signed decimal degrees WGS-84.
my $lon=$placemark->lon;
=cut
sub lon {
my $self=shift;
$self->{'lon'}=shift if @_;
return $self->{'lon'};
}
=head2 alt
Sets or returns altitude. The units are meters above the ellipsoid WGS-84.
my $alt=$placemark->alt;
Typically, Google Earth "snaps" Placemarks to the surface regardless of how the altitude is set.
=cut
sub alt {
my $self=shift;
$self->{'alt'}=shift if @_;
$self->{'alt'}||=0;
return $self->{'alt'};
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Contrib/LineString.pm 0000644 0001750 0001750 00000003307 14130057535 027205 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Contrib::LineString;
use base qw{Geo::GoogleEarth::Pluggable::Placemark};
use XML::LibXML::LazyBuilder qw{E};
use warnings;
use strict;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Contrib::LineString - Geo::GoogleEarth::Pluggable LineString Object
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new();
$document->LineString();
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::Contrib::LineString is a L with a few other methods.
=head1 USAGE
my $placemark=$document->LineString(name=>"LineString Name",
coordinates=>[[lat,lon,alt],
[lat,lon,alt],...]);
=head1 CONSTRUCTOR
=head2 new
my $placemark=$document->LineString();
=head1 METHODS
=head2 subnode
=cut
sub subnode {
my $self=shift;
my %data=%$self;
$data{"tessellate"}=1 unless defined $data{"tessellate"};
my $coordinates=$self->coordinates_stringify($data{"coordinates"});
my @element=();
push @element, E(tessellate=>{}, $data{"tessellate"});
push @element, E(coordinates=>{}, $coordinates);
return E(LineString=>{}, @element);
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the
LICENSE file included with this module.
=head1 SEE ALSO
L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Contrib/LinearRing.pm 0000644 0001750 0001750 00000003427 14130057530 027157 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Contrib::LinearRing;
use base qw{Geo::GoogleEarth::Pluggable::Placemark};
use XML::LibXML::LazyBuilder qw{E};
use warnings;
use strict;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Contrib::LinearRing - Geo::GoogleEarth::Pluggable LinearRing Object
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new();
$document->LinearRing();
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::Contrib::LinearRing is a L with a few other methods.
=head1 USAGE
my $placemark=$document->LinearRing(name=>"LinearRing Name",
coordinates=>[[lat,lon,alt],
[lat,lon,alt],...]);
=head1 CONSTRUCTOR
=head2 new
my $placemark=$document->LinearRing();
=head1 METHODS
=head2 subnode
=cut
sub subnode {
my $self=shift;
my %data=%$self;
$data{"tessellate"}=1 unless defined $data{"tessellate"};
my $coordinates=$self->coordinates_stringify($data{"coordinates"});
my @element=();
push @element, E(tessellate=>{}, $data{"tessellate"});
push @element, E(outerBoundaryIs=>{},
E(LinearRing=>{},
E(coordinates=>{}, $coordinates)));
return E(Polygon=>{}, @element);
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Contrib/MultiPolygon.pm 0000644 0001750 0001750 00000006344 14130057543 027574 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon;
use base qw{Geo::GoogleEarth::Pluggable::Placemark};
use XML::LibXML::LazyBuilder qw{E};
use warnings;
use strict;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon - Geo::GoogleEarth::Pluggable MultiPolygon Object
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new();
$document->MultiPolygon();
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon is a L.
=head1 USAGE
#Note: lon, lat, alt like GeoJSON.
my $placemark=$document->MultiPolygon(
name => "MultiPolygon Name",
coordinates => [
[ #outerBoundaryIs
[lon, lat ,alt],
[lon, lat ,alt],
[lon, lat ,alt],
...
],
[ #innerBoundaryIs
[lon, lat ,alt],
[lon, lat ,alt],
[lon, lat ,alt],
]
],
);
=head1 CONSTRUCTOR
my $placemark=$document->MultiPolygon();
=head1 METHODS
=head2 subnode
=cut
sub subnode {
my $self = shift;
my %data = %$self;
$data{"tessellate"} = 1 unless defined $data{"tessellate"};
my $multipolygon = $data{"coordinates"} or die("Error: MultiPolygon coordinates required");
die("Error: MultiPolygon coordinates must be an array reference") unless ref($multipolygon) eq "ARRAY";
my @elements = ();
foreach my $polygon (@$multipolygon) {
die("Error: MultiPolygon coordinates polygon must be an array reference") unless ref($polygon) eq "ARRAY";
my @polygon_element = (E(tessellate=>{}, $data{"tessellate"}));
my $first = 1;
foreach my $boundary (@$polygon) {
die("Error: MultiPolygon coordinates polygon first boundary (outerBoundaryIs) must be an array reference") unless ref($boundary) eq "ARRAY";
my $string = $self->coordinates_stringify($boundary);
push @polygon_element, E(($first ? "outerBoundaryIs" : "innerBoundaryIs"), {}, E(LinearRing=>{}, E(coordinates=>{}, $string)));
$first = 0;
}
push @elements, E(Polygon => {}, @polygon_element);
}
return E(MultiGeometry=>{}, @elements);
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Contrib/Polygon.pm 0000644 0001750 0001750 00000005531 14130057547 026562 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Contrib::Polygon;
use base qw{Geo::GoogleEarth::Pluggable::Placemark};
use XML::LibXML::LazyBuilder qw{E};
use warnings;
use strict;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Contrib::Polygon - Geo::GoogleEarth::Pluggable Polygon Object
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new();
$document->Polygon();
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::Contrib::Polygon is a L.
=head1 USAGE
my $placemark=$document->Polygon(
name => "Polygon Name",
coordinates => [
[ #outerBoundaryIs
[lon, lat ,alt],
[lon, lat ,alt],
[lon, lat ,alt],
...
],
[ #innerBoundaryIs
[lon, lat ,alt],
[lon, lat ,alt],
[lon, lat ,alt],
]
],
);
=head1 CONSTRUCTOR
my $placemark=$document->Polygon();
=head1 METHODS
=head2 subnode
=cut
sub subnode {
my $self = shift;
my %data = %$self;
$data{"tessellate"} = 1 unless defined $data{"tessellate"};
my $polygon = $data{"coordinates"} or die("Error: Polygon coordinates required");
die("Error: Polygon coordinates must be an array reference") unless ref($polygon) eq "ARRAY";
my @elements = (E(tessellate=>{}, $data{"tessellate"}));
my $first = 1;
foreach my $boundary (@$polygon) {
die("Error: Polygon coordinates boundary must be an array reference") unless ref($boundary) eq "ARRAY";
my $string = $self->coordinates_stringify($boundary);
push @elements, E(($first ? "outerBoundaryIs" : "innerBoundaryIs"), {}, E(LinearRing=>{}, E(coordinates=>{}, $string)));
$first = 0;
}
return E(Polygon=>{}, @elements);
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Base.pm 0000644 0001750 0001750 00000006035 14130057602 024375 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Base;
use warnings;
use strict;
use base qw{Geo::GoogleEarth::Pluggable::Constructor};
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Base - Geo::GoogleEarth::Pluggable Base package
=head1 SYNOPSIS
use base qw{Geo::GoogleEarth::Pluggable::Base};
=head1 DESCRIPTION
The is the base of all Geo::GoogleEarth::Pluggable packages.
=head1 USAGE
=head1 CONSTRUCTOR
=head2 new
my $document = Geo::GoogleEarth::Pluggable->new(key1=>value1,
key2=>[value=>{opt1=>val1}],
key3=>{value=>{opt2=>val2}});
=head1 METHODS
=head2 name
Sets or returns the name property.
my $name=$folder->name;
$placemark->name("New Name");
$document->name("New Name");
=cut
sub name {
my $self=shift;
$self->{'name'}=shift if @_;
return $self->{'name'};
}
=head2 description
Sets or returns the description property.
my $description=$folder->description;
$placemark->description("New Description");
$document->description("New Description");
=cut
sub description {
my $self=shift;
$self->{'description'}=shift if @_;
return $self->{'description'};
}
=head2 Snippet
Returns the Snippet used in the Snippet XML element or a Placemark. The default Snippet from Google Earth is to use the first line of the description however this package defaults to a zero line Snippet.
Snippet is rendered with maxLines as the length of the array ref and the content joined with new lines.
Typical use
$document->Point(Snippet=>"Line 1");
$document->Point(Snippet=>["Line 1", "Line 2"]);
Extended used
my $snippet=$placemark->Snippet; #[] always array reference
$placemark->Snippet([]); #default
$placemark->Snippet(["line 1", "line 2", "line 3"]);
$placemark->Snippet("My Snippet Text"); #folded into array reference.
$placemark->Snippet("line 1", "line 2", "line 3"); #folded into array reference
=cut
sub Snippet {
my $self=shift;
if (@_ == 1) {
$self->{"Snippet"}=shift;
} elsif (@_ > 1) {
$self->{"Snippet"}=[@_];
}
#force undef to default empty array reference
$self->{"Snippet"}=[] unless defined $self->{"Snippet"};
#force to array reference
$self->{"Snippet"}=[$self->{"Snippet"}] unless ref($self->{"Snippet"}) eq "ARRAY";
return $self->{"Snippet"};
}
=head2 lookat
Sets or returns a L object
=cut
sub lookat {
my $self=shift;
$self->{"lookat"}=shift if @_;
return $self->{"lookat"};
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L creates a GoogleEarth Document.
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/LookAt.pm 0000644 0001750 0001750 00000005456 14130057770 024730 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::LookAt;
use strict;
use warnings;
use base qw{Geo::GoogleEarth::Pluggable::Constructor};
use XML::LibXML::LazyBuilder qw{E};
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::LookAt - Geo::GoogleEarth::Pluggable LookAt package
=head1 SYNOPSIS
my $lookat=$document->LookAt(
latitude => 38.1741527,
longitude => -96.7839388,
range => 3525808,
heading => 0,
tilt => 0,
);
Assign LookAt during construction
my $folder=$document->Folder(name=>"MyLook", lookat=>$lookat);
my $point=$folder->Point(lat=>$lat, lon=>$lon, lookat=>$lookat);
Assign LookAt afer construction
$document->lookat($lookat);
$folder->lookat($lookat);
$point->lookat($lookat);
Do it all at one time
my $point=$folder->Point(lat => $lat,
lon => $lon,
lookat => $document->LookAt(%data));
=head1 DESCRIPTION
Provides a way to configure a LookAt for all Folders and Placemarks.
=head1 USAGE
=head1 CONSTRUCTOR
All Folder objects have a LookAt constructor.
my $object=$document->LookAt(%data);
my $object=$folder->LookAt(%data);
=head2 new
=head2 type
Returns the object type.
my $type=$lookat->type;
=cut
sub type {'LookAt'};
=head2 latitude
=cut
sub latitude {
my $self=shift;
$self->{'latitude'}=shift if @_;
return $self->{'latitude'};
}
=head2 longitude
=cut
sub longitude {
my $self=shift;
$self->{'longitude'}=shift if @_;
return $self->{'longitude'};
}
=head2 range
=cut
sub range {
my $self=shift;
$self->{'range'}=shift if @_;
return $self->{'range'};
}
=head2 tilt
=cut
sub tilt {
my $self=shift;
$self->{'tilt'}=shift if @_;
return $self->{'tilt'};
}
=head2 heading
=cut
sub heading {
my $self=shift;
$self->{'heading'}=shift if @_;
return $self->{'heading'};
}
=head2 node
Returns the L element for the LookAt object.
=cut
sub node {
my $self=shift;
my @elements=();
my %skip=map {$_=>1} qw{document};
foreach my $key (sort keys %$self) {
next if exists $skip{$key};
push @elements, E($key => {}, $self->{$key});
}
return E(LookAt => {}, @elements);
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L creates a GoogleEarth Document.
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Placemark.pm 0000644 0001750 0001750 00000012514 14130057514 025423 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Placemark;
use base qw{Geo::GoogleEarth::Pluggable::Base};
use strict;
use warnings;
use Scalar::Util qw{reftype blessed};
use XML::LibXML::LazyBuilder qw{E};
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Placemark - Base Object for Geo::GoogleEarth::Pluggable Placemarks
=head1 SYNOPSIS
use base qw{Geo::GoogleEarth::Pluggable::Placemark};
=head1 DESCRIPTION
The is the base of all Geo::GoogleEarth::Pluggable packages.
=head1 USAGE
=head1 METHODS
=head2 type
=cut
sub type {"Placemark"};
=head2 style
Sets or returns the Placemark Style or StyleMap object.
style=>$style is a short cut for styleUrl=>$style->url
=cut
sub style {
my $self=shift;
$self->{"style"}=shift if @_;
return $self->{"style"};
}
=head2 styleUrl
This overrides style->url if defined.
=cut
sub styleUrl {
my $self=shift;
my $url=undef;
$url=$self->style->url if blessed($self->style) && $self->style->can("url");
$self->{"styleUrl"}||=$url;
$self->{"styleUrl"}=shift if @_;
return $self->{"styleUrl"};
}
=head2 LookAt
Sets or returns the LookAt Object
=cut
sub LookAt {
my $self=shift;
$self->{"LookAt"}=shift if @_;
return $self->{"LookAt"};
}
=head2 visibility
Sets or returns visibility. The value is either 1 or 0 but defaults to undef which the same as 1.
my $visibility=$placemark->visibility;
=cut
sub visibility {
my $self=shift;
$self->{"visibility"}=shift if @_;
return $self->{"visibility"};
}
=head2 node
=cut
sub node {
my $self=shift;
my @element=();
push @element, $self->lookat->node
if ref($self->lookat) and $self->lookat->can("node");
push @element, E(name=>{}, $self->name)
if defined $self->name;
push @element, E(Snippet=>{maxLines=>scalar(@{$self->Snippet})}, join("\n", @{$self->Snippet}));
push @element, E(description=>{}, $self->description)
if defined $self->description;
push @element, E(visibility=>{}, $self->visibility)
if defined $self->visibility;
push @element, E(styleUrl=>{}, $self->styleUrl)
if defined $self->styleUrl;
push @element, $self->subnode;
return E($self->type=>{}, @element);
}
=head2 coordinates
The coordinates array is used consistantly for all placemark objects.
my $coordinates=$placemark->coordinates(
[
[$lon, $lat, $alt],
{lat=>$lat, lon=>$lon, alt=>$alt},
GPS::Point,
Geo::Point,
Net::GPSD::Point,
]
);
my $coordinates=$placemark->coordinates(
Geo::Line, #TODO
);
=cut
sub coordinates {
my $self=shift;
$self->{"coordinates"}=shift if @_;
return $self->{"coordinates"};
}
=head2 coordinates_stringify
=cut
sub coordinates_stringify {
my $self=shift;
my $data=@_ ? shift : $self->coordinates;
my $string="";
if (ref($data) eq "ARRAY") {
$string=join(" ", map {$self->point_stringify($_)} @$data);
} else {
die(sprintf(qq{Error: the coordinates_stringify method does not understand coordinates value type "%s"}, ref($data)));
}
return $string;
}
=head2 point_stringify
my $string=$placemark->point_stringify($point); #returns "$lon,$lat,$alt"
=cut
sub point_stringify {
my $self=shift;
my %data=$self->point_normalize(@_);
return join(",", @data{qw{lon lat alt}});
}
=head2 point_normalize
Most of this code was taken from GPS::Point->initializeMulti
my $data=$placemark->point_normalize($point); #returns {lat=>$lat,lon=>$lon,alt=>$alt}
=cut
sub point_normalize {
my $self=shift;
my $point=shift;
my $data={};
if (ref($point) eq "Geo::Point") {
$point=$point->in('wgs84') unless $point->proj eq "wgs84";
$data->{'lat'}=$point->latitude;
$data->{'lon'}=$point->longitude;
$data->{'alt'}=0;
} elsif (ref($point) eq "GPS::Point") {
$data->{'lat'}=$point->lat;
$data->{'lon'}=$point->lon;
$data->{'alt'}=$point->alt||0;
} elsif (ref($point) eq "Net::GPSD::Point") {
$data->{'lat'}=$point->latitude;
$data->{'lon'}=$point->longitude;
$data->{'alt'}=$point->altitude||0;
} elsif (reftype($point) eq "HASH") {
#{lat=>$lat, lon=>$lon, alt=>$alt}
$data->{'lat'}=$point->{'lat'}||$point->{'latitude'};
$data->{'lon'}=$point->{'lon'}||$point->{'long'}||$point->{'longitude'};
$data->{'alt'}=$point->{'alt'}||$point->{'altitude'}||
$point->{'elevation'}||$point->{'hae'}||$point->{'elev'}||0;
} elsif (reftype($point) eq "ARRAY") {
#[$lon, $lat, $alt]
$data->{'lon'}=$point->[0];
$data->{'lat'}=$point->[1];
$data->{'alt'}=$point->[2]||0;
}
$data->{$_}+=0 foreach qw{lat lon alt}; #convert to number to "trim" strings that look like numbers.
return wantarray ? %$data : $data;
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/StyleMap.pm 0000644 0001750 0001750 00000004242 14130057506 025262 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::StyleMap;
use base qw{Geo::GoogleEarth::Pluggable::StyleBase};
use Scalar::Util qw{blessed};
use XML::LibXML::LazyBuilder qw{E};
use warnings;
use strict;
our $VERSION='0.17';
our $PACKAGE=__PACKAGE__;
=head1 NAME
Geo::GoogleEarth::Pluggable::StyleMap - Geo::GoogleEarth::Pluggable StyleMap Object
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;
my $style=$document->StyleMap(%data);
print $document->render;
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::StyleMap is a L with a few other methods.
=head1 USAGE
my $style=$document->StyleMap(
normal => $style1,
highlight => $style2,
);
=head1 CONSTRUCTOR
=head2 new
my $style=$document->StyleMap;
=head1 METHODS
=head2 type
Returns the object type.
my $type=$style->type;
=cut
sub type {"StyleMap"};
=head2 node
Generates XML that looks like this.
normal
#Style-perl-19
highlight
#Style-perl-11
=cut
sub node {
my $self=shift;
my @element=();
foreach my $key (keys %$self) {
#$key should be either "normal" or "highlight"
next if $key eq "document";
next if $key eq "id";
my $value=$self->{$key}||'';
if (blessed($value) and $value->can("type") and $value->type=~m/^Style/) {
$value=$value->url;
}
push @element, E(Pair=>{}, E(key=>{}, $key), E(styleUrl=>{}, $value));
}
return E(StyleMap=>{id=>$self->id}, @element);
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the
LICENSE file included with this module.
=head1 SEE ALSO
L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/StyleBase.pm 0000644 0001750 0001750 00000002474 14130057622 025423 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::StyleBase;
use base qw{Geo::GoogleEarth::Pluggable::Base};
use warnings;
use strict;
our $VERSION='0.17';
our $PACKAGE=__PACKAGE__;
=head1 NAME
Geo::GoogleEarth::Pluggable::StyleBase - Geo::GoogleEarth::Pluggable StyleBase Object
=head1 SYNOPSIS
use base qw{Geo::GoogleEarth::Pluggable::StyleBase};
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::StyleBase is a L with a few other methods.
=head1 USAGE
my $style=$document->Style(id=>"Style_Internal_HREF",
iconHref=>"http://.../path/image.png");
=head1 METHODS
=head2 id
=cut
sub id {
my $self=shift();
$self->{'id'}=shift if @_;
$self->{'id'}=$self->document->nextId($self->type) unless defined $self->{"id"};
return $self->{'id'};
}
=head2 url
=cut
sub url {
my $self=shift;
return sprintf("#%s", $self->id);
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the
LICENSE file included with this module.
=head1 SEE ALSO
L creates a GoogleEarth Document.
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Style.pm 0000644 0001750 0001750 00000007537 14130057522 024634 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Style;
use base qw{Geo::GoogleEarth::Pluggable::StyleBase};
use Scalar::Util qw{reftype};
use XML::LibXML::LazyBuilder qw{E};
use warnings;
use strict;
our $VERSION='0.17';
our $PACKAGE=__PACKAGE__;
=head1 NAME
Geo::GoogleEarth::Pluggable::Style - Geo::GoogleEarth::Pluggable Style Object
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new();
my $style=$document->Style();
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::Style is a L with a few other methods.
=head1 USAGE
my $style=$document->Style(id=>"Style_Internal_HREF",
iconHref=>"http://.../path/image.png");
=head1 CONSTRUCTOR
=head2 new
my $style=$document->Style(id=>"Style_Internal_HREF",
iconHref=>"http://.../path/image.png");
=head1 METHODS
=head2 type
Returns the object type.
my $type=$style->type;
=cut
sub type {"Style"};
=head2 node
=cut
sub node {
my $self=shift;
my @element=();
foreach my $style (keys %$self) {
next if $style eq "document";
next if $style eq "id";
my @subelement=();
if (reftype($self->{$style}) eq "HASH") {
foreach my $key (keys %{$self->{$style}}) {
my $value=$self->{$style}->{$key};
#printf "Style: %s, Key: %s, Value: %s\n", $style, $key, $value;
#push @subelement, E(key=>{}, $key);
if ($key eq "color") {
push @subelement, E($key=>{}, $self->color($value));
} elsif ($key eq "href") {
if ($style eq "ListStyle") { #Google Earth Inconsistency!
push @subelement, E(ItemIcon=>{}, E($key=>{}, $value));
} else {
push @subelement, E(Icon=>{}, E($key=>{}, $value)); #which way to default
}
} elsif (ref($value) eq "HASH") { #e.g. hotSpot
push @subelement, E($key=>$value);
} elsif (ref($value) eq "ARRAY") {
push @subelement, E($key=>{}, join(",", @$value));
} else {
push @subelement, E($key=>{}, $value);
}
}
} else {
warn("Warning: Expecting $style to be a hash reference.");
}
push @element, E($style=>{}, @subelement);
}
return E(Style=>{id=>$self->id}, @element);
}
=head2 color
Returns a color code for use in the XML structure given many different inputs.
my $color=$style->color("FFFFFFFF"); #AABBGGRR in hex
my $color=$style->color({color="FFFFFFFF"});
my $color=$style->color({red=>255, green=>255, blue=>255, alpha=>255});
my $color=$style->color({rgb=>[255,255,255], alpha=>255});
my $color=$style->color({abgr=>[255,255,255,255]});
#my $color=$style->color({name=>"blue", alpha=>255}); #TODO with ColorNames
Note: alpha can be 0-255 or "0%"-"100%"
=cut
sub color {
my $self=shift;
my $color=shift;
if (ref($color) eq "HASH") {
if (defined($color->{"color"})) {
return $color->{"color"} || "FFFFFFFF";
} else {
my $a=$color->{"a"} || $color->{"alpha"} || $color->{"abgr"}->[0];
my $b=$color->{"b"} || $color->{"blue"} || $color->{"abgr"}->[1] || 0;
my $g=$color->{"g"} || $color->{"green"} || $color->{"abgr"}->[2] || 0;
my $r=$color->{"r"} || $color->{"red"} || $color->{"abgr"}->[3] || 0;
$a=255 unless defined $a;
if ($a=~m/(\d+)%/) {
$a=$1/100*255;
}
return unpack("H8", pack("C4", $a,$b,$g,$r));
}
} else {
return $color || "FFFFFFFF";
}
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the
LICENSE file included with this module.
=head1 SEE ALSO
L creates a GoogleEarth Document.
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Plugin/ 0000755 0001750 0001750 00000000000 14130060237 024415 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Plugin/Others.pm 0000644 0001750 0001750 00000004036 14130057470 026227 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Plugin::Others;
use strict;
use warnings;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Plugin::Others - Geo::GoogleEarth::Pluggable Others Plugin Methods
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;
my @point=$document->MultiPoint(%data); #()
my $point=$document->MultiPoint(%data); #[]
=head1 METHODS
Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime.
=head2 MultiPoint
my @point=$document->MultiPoint(
name=>"Point", #SCALAR sprintf("%s (%s)", $name, $index)
coordinates=>[{}, {}, ...], #CODE ($index, $point)
#TODO#name=>["pt1", "pt2", ...], #ARRAY
#TODO#name=>sub{sprintf("Point %s is a %s", shift, ref(shift))},
);
Note: Currently coordinates must be {lat=>$lat, lon=>$lon, alt=>$alt}
TODO: Coordinates can be any format supported by Placemark->coordinates
=cut
sub MultiPoint {
my $self=shift; #$self isa Geo::GoogleEarth::Pluggable::Folder object
my %data=@_;
$data{"name"}||="Point";
$data{"coordinates"}=[] unless ref($data{"coordinates"}) eq "ARRAY";
my @point=();
my $index=0;
foreach my $pt (@{$data{"coordinates"}}) {
my $name=sprintf("%s (%s)", $data{"name"}, $index++);
push @point, $self->Point(
name=>$name,
%$pt
);
}
return wantarray ? @point : \@point;
}
=head1 TODO
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Plugin/Default.pm 0000644 0001750 0001750 00000013474 14130057465 026361 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Plugin::Default;
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable::Contrib::Point;
use Geo::GoogleEarth::Pluggable::Contrib::LineString;
use Geo::GoogleEarth::Pluggable::Contrib::LinearRing;
use Geo::GoogleEarth::Pluggable::Contrib::Polygon;
use Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Plugin::Default - Geo::GoogleEarth::Pluggable Default Plugin Methods
=head1 METHODS
Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime.
=head1 CONVENTIONS
Plugin Naming Convention: Geo::GoogleEarth::Pluggable::Plugin::CPANID (e.g. "MRDVT")
Object Naming Convention: Geo::GoogleEarth::Pluggable::Contrib::"$method" (e.g. Point, CircleByCenterPoint)
You only need to have one plugin pointing to all of your contributed objects.
The package should be named after the plugin not the objects since there is a many to one relationship. (e.g. Geo-GoogleEarth-Pluggable-Plugin-MRDVT)
=head2 Point
Constructs a new Placemark Point object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction.
my $point=$folder->Point(name=>"My Placemark",
lat=>38.897607,
lon=>-77.036554,
alt=>0);
=cut
sub Point {
my $self=shift; #This will be a Geo::GoogleEarth::Pluggable::Folder object
my $obj=Geo::GoogleEarth::Pluggable::Contrib::Point->new(document=>$self->document, @_);
$self->data($obj);
return $obj;
}
=head2 Polygon
$folder->Polygon(
name => "My Polygon",
coordinates => [
[ #outerBoundaryIs
[ -95.74356, 29.61974 ],
[ -95.74868, 29.62188 ],
[ -95.74857, 29.62210 ],
[ -95.74256, 29.62266 ],
[ -95.74356, 29.61974 ],
],
\@innerBoundaryIs1,
\@innerBoundaryIs2,
\@innerBoundaryIs3,
],
style => $style,
open => 1,
description => $html,
),
=cut
sub Polygon {
my $self = shift; #This will be a Geo::GoogleEarth::Pluggable::Folder object
my $obj = Geo::GoogleEarth::Pluggable::Contrib::Polygon->new(document=>$self->document, @_);
$self->data($obj);
return $obj;
}
=head2 MultiPolygon
$folder->MultiPolygon(
name => "My MultiPolygon",
coordinates => [ #MultiGeometry
[ #Polygon1
[
[ -95.45662, 29.77814 ],
[ -95.45668, 29.77809 ],
[ -95.45675, 29.77814 ],
[ -95.45669, 29.77820 ],
[ -95.45662, 29.77814 ],
],
\@innerBoundaryIs1,
],
[ #Polygon2
[
[ -95.45677, 29.77785 ],
[ -95.45683, 29.77780 ],
[ -95.45689, 29.77785 ],
[ -95.45683, 29.77791 ],
[ -95.45677, 29.77785 ],
],
],
],
);
=cut
sub MultiPolygon {
my $self = shift; #This will be a Geo::GoogleEarth::Pluggable::Folder object
my $obj = Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon->new(document=>$self->document, @_);
$self->data($obj);
return $obj;
}
=head2 LineString
$folder->LineString(name=>"My Placemark",
coordinates=>[
[lat,lon,alt],
{lat=>$lat,lon=>$lon,alt=>$alt},
]);
=cut
sub LineString {
my $self=shift;
my $obj=Geo::GoogleEarth::Pluggable::Contrib::LineString->new(document=>$self->document, @_);
$self->data($obj);
return $obj;
}
=head2 LinearRing
$folder->LinearRing(name=>"My Placemark",
coordinates=>[
[lat,lon,alt],
{lat=>$lat,lon=>$lon,alt=>$alt},
]);
=cut
sub LinearRing {
my $self=shift;
my $obj=Geo::GoogleEarth::Pluggable::Contrib::LinearRing->new(document=>$self->document, @_);
$self->data($obj);
return $obj;
}
=head1 TODO
Need to determine what methods should be in the Folder package and what should be on the Plugin/Default package and why.
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Plugin/Style.pm 0000644 0001750 0001750 00000012174 14130057475 026072 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Plugin::Style;
use Geo::GoogleEarth::Pluggable::Style;
use Geo::GoogleEarth::Pluggable::StyleMap;
use Scalar::Util qw{blessed};
use warnings;
use strict;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Plugin::Style - Geo::GoogleEarth::Pluggable Style Plugin Methods
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new; #ISA L
my $style=$document->IconStyle(color=>{red=>255}); #ISA L
my $point=$document->Point(style=>$style); #ISA L
print $document->render;
=head1 METHODS
Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime.
=head2 Style
Constructs a new Style object and appends it to the document object. Returns the Style object reference.
my $style=$folder->Style(
id => $id, #default is good
IconStyle => {},
LineStyle => {},
PolyStyle => {},
LabelStyle => {},
ListStyle => {},
);
my $style=$folder->Style(
IconStyle => $style1, #extracts IconStyle from $style1
LineStyle => $style2, #extracts LineStyle from $style2
PolyStyle => $style3, #extracts PolyStyle from $style3
);
=cut
sub Style {
my $self=shift;
my %data=@_;
foreach my $key (keys %data) {
next unless $key=~m/Style$/;
#Extracts the particular IconStyle, LineStyle, etc from an existing Style object
my $ref=$data{$key};
if (blessed($ref) and $ref->can("type") and $ref->type eq "Style") {
$data{$key}=$ref->{$key}; #allow Style to be blessed objects
}
}
my $obj=Geo::GoogleEarth::Pluggable::Style->new(
document=>$self->document,
%data,
);
$self->document->data($obj);
return $obj;
}
=head2 StyleMap
Constructs a new StyleMap object and appends it to the document object. Returns the StyleMap object reference.
my $stylemap=$document->StyleMap(
normal => $style1,
highlight => $style2,
);
=cut
sub StyleMap {
my $self=shift;
my %data=@_;
my $obj=Geo::GoogleEarth::Pluggable::StyleMap->new(
document=>$self->document,
%data,
);
$self->document->data($obj);
return $obj;
}
=head2 IconStyle
my $style=$folder->IconStyle(
color => $color,
scale => $scale,
href => $url,
);
=cut
sub IconStyle {
my $self=shift;
my %data=@_;
my $id=delete($data{"id"}); #undef is fine here...
return $self->Style(id=>$id, IconStyle=>\%data);
}
=head2 LineStyle
my $color={red=>255, green=>255, blue=>255, alpha=>255};
my $style=$folder->LineStyle(color=>$color);
=cut
sub LineStyle {
my $self=shift;
my %data=@_;
$data{"width"}=1 unless defined $data{"width"};
my $id=delete($data{"id"}); #undef is fine here...
return $self->Style(id=>$id, LineStyle=>\%data);
}
=head2 PolyStyle
my $color={red=>255, green=>255, blue=>255, alpha=>255};
my $style=$folder->PolyStyle(color=>$color);
=cut
sub PolyStyle {
my $self=shift;
my %data=@_;
my $id=delete($data{"id"}); #undef is fine here...
return $self->Style(id=>$id, PolyStyle=>\%data);
}
=head2 LabelStyle
my $style=$folder->LabelStyle(
color => $color,
scale => $scale,
);
=cut
sub LabelStyle {
my $self=shift;
my %data=@_;
my $id=delete($data{"id"}); #undef is fine here...
return $self->Style(id=>$id, LabelStyle=>\%data);
}
=head2 ListStyle
my $style=$folder->ListStyle(
href => $url,
);
=cut
sub ListStyle {
my $self=shift;
my %data=@_;
my $id=delete($data{"id"}); #undef is fine here...
return $self->Style(id=>$id, ListStyle=>\%data);
}
=head1 TODO
Need to determine what methods should be in the Folder package and what should be on the Plugin/Style package and why.
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 LIMITATIONS
This will construct 100 identical style objects
foreach (1 .. 100) {
$document->Point(style=>$document->IconStyle(color=>{red=>255}));
}
Do this instead
my $style=$document->IconStyle(color=>{red=>255});
foreach (1 .. 100) {
$document->Point(style=>$style);
}
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the
LICENSE file included with this module.
=head1 SEE ALSO
L creates a GoogleEarth Document.
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Constructor.pm 0000644 0001750 0001750 00000002447 14130057562 026060 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Constructor;
use warnings;
use strict;
use base qw{Package::New};
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Constructor - Geo::GoogleEarth::Pluggable Constructor package
=head1 SYNOPSIS
use base qw{Geo::GoogleEarth::Pluggable::Constructor};
=head1 DESCRIPTION
The is the constructor for all Geo::GoogleEarth::Pluggable packages.
=head1 USAGE
=head1 CONSTRUCTOR
=head2 new
my $document = Geo::GoogleEarth::Pluggable->new(key1=>value1,
key2=>[value=>{opt1=>val1}],
key3=>{value=>{opt2=>val2}});
=head1 METHODS
=head2 document
Always returns the document object. Every object should know what document it is in.
=cut
sub document {shift->{"document"}};
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L creates a GoogleEarth Document.
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/NetworkLink.pm 0000644 0001750 0001750 00000004500 14130057567 025777 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::NetworkLink;
use base qw{Geo::GoogleEarth::Pluggable::Base};
use XML::LibXML::LazyBuilder qw{E};
use warnings;
use strict;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::NetworkLink - Geo::GoogleEarth::Pluggable::NetworkLink
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;
$document->NetworkLink(url=>"./anotherdocument.cgi");
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::NetworkLink is a L with a few other methods.
=head1 USAGE
my $networklink=$document->NetworkLink(name=>"My NetworkLink",
url=>"./anotherdocument.cgi");
=head2 type
Returns the object type.
my $type=$networklink->type;
=cut
sub type {"NetworkLink"};
=head2 node
=cut
sub node {
my $self=shift;
my @element=(E(Snippet=>{maxLines=>scalar(@{$self->Snippet})}, join("\n", @{$self->Snippet})));
my @link=();
my %link=map {$_=>1} qw{href refreshMode refreshInterval viewRefreshMode viewRefreshTime viewBoundScale viewFormat httpQuery};
foreach my $key (keys %$self) {
next if $key eq "Snippet";
if ($key eq "url") {
push @link, E(href=>{}, $self->url);
} elsif(exists $link{$key}) { #these go in the Link element
push @link, E($key=>{}, $self->{$key}) unless ref($self->{$key});
} else {
push @element, E($key=>{}, $self->{$key}) unless ref($self->{$key});
}
}
push @element, E(Link=>{}, @link) if @link;
return E(NetworkLink=>{}, @element);
}
=head2 url
Sets or returns the Uniform Resource Locator (URL) for the NetworkLink
my $url=$networklink->url;
$networklink->url("./newdoc.cgi");
=cut
sub url {
my $self=shift();
if (@_) {
$self->{'url'}=shift();
}
return defined($self->{'url'}) ? $self->{'url'} : 'http://localhost/';
}
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L creates a GoogleEarth Document.
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable/Folder.pm 0000644 0001750 0001750 00000011640 14130057710 024734 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable::Folder;
use base qw{Geo::GoogleEarth::Pluggable::Base};
use XML::LibXML::LazyBuilder qw{E};
use Scalar::Util qw{blessed};
use warnings;
use strict;
use Module::Pluggable search_path => "Geo::GoogleEarth::Pluggable::Plugin";
use base qw{Method::Autoload};
use Geo::GoogleEarth::Pluggable::NetworkLink;
use Geo::GoogleEarth::Pluggable::LookAt;
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable::Folder - Geo::GoogleEarth::Pluggable::Folder object
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;
my $folder=$document->Folder(name=>"My Folder");
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable::Folder is a L with a few other methods.
=head1 USAGE
my $folder=$document->Folder(); #add folder to $document
my $subfolder=$folder->Folder(); #add folder to $folder
=head1 METHODS
=cut
=head2 initialize
We overide the default "initialize" method in order to append the "plugins" method from L on to the packages list of the L package.
The "packages" property is what is needed by L package. The "plugins" method is what is provided by L. So, the Folder package now has available to it every method in the "Plugins" folder at runtime.
=cut
sub initialize {
my $self = shift();
%$self=@_;
$self->pushPackages($self->plugins);
}
=head2 Folder
Constructs a new Folder object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction.
my $folder=$folder->Folder(name=>"My Folder");
$folder->Folder(name=>"My Folder");
=cut
sub Folder {
my $self=shift;
my $obj=Geo::GoogleEarth::Pluggable::Folder->new(document=>$self->document, @_);
$self->data($obj);
return $obj;
}
=head2 NetworkLink
Constructs a new NetworkLink object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction.
$folder->NetworkLink(name=>"My NetworkLink", url=>"./anotherdoc.kml");
=cut
sub NetworkLink {
my $self=shift();
my $obj=Geo::GoogleEarth::Pluggable::NetworkLink->new(document=>$self->document, @_);
$self->data($obj);
return $obj;
}
=head2 LookAt
Constructs a new LookAt object and returns the object reference to assign to other object "lookat" properties.
$document->LookAt(
latitude => $lat, #decimal degrees
longitude => $lon, #decimal degrees
range => $range, #meters
tilt => $tilt, #decimal degrees from veritical
heading => $header, #decimal degrees from North
);
=cut
sub LookAt {
my $self=shift();
my $obj=Geo::GoogleEarth::Pluggable::LookAt->new(document=>$self->document, @_);
$self->data($obj);
return $obj;
}
=head2 type
Returns the object type.
my $type=$folder->type;
=cut
sub type {"Folder"};
=head2 node
=cut
sub node {
my $self=shift;
my @data=();
push @data, E(name=>{}, $self->name) if defined $self->name;
push @data, E(Snippet=>{maxLines=>scalar(@{$self->Snippet})}, join("\n", @{$self->Snippet}));
push @data, E(description=>{}, $self->description)
if defined $self->description;
push @data, E(open=>{}, $self->open) if defined $self->open;
my @style=();
my @stylemap=();
my @element=();
foreach my $obj ($self->data) {
if (blessed($obj) and $obj->can("type") and $obj->type eq "Style") {
push @style, $obj->node;
} elsif (blessed($obj) and $obj->can("type") and $obj->type eq "StyleMap") {
push @stylemap, $obj->node;
} else {
push @element, $obj->node;
}
}
return E($self->type=>{}, @data, @style, @stylemap, @element);
}
=head2 data
Pushes arguments onto data array and returns an array or reference that holds folder object content. This is a list of objects that supports a type and structure method.
my $data=$folder->data;
my @data=$folder->data;
$folder->data($placemark);
=cut
sub data {
my $self=shift();
$self->{'data'} = [] unless ref($self->{'data'}) eq "ARRAY";
my $data=$self->{'data'};
if (@_) {
push @$data, @_;
}
return wantarray ? @$data : $data;
}
=head2 open
=cut
sub open {shift->{"open"}};
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 LIMITATIONS
Due to limitations in Perl hashes, it is not possible to specify the order of certain elements and attributes in the XML.
=head1 TODO
=head1 SUPPORT
Try geo-perl email list.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the
LICENSE file included with this module.
=head1 SEE ALSO
L, L L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/lib/Geo/GoogleEarth/Pluggable.pm 0000644 0001750 0001750 00000017050 14130056053 023521 0 ustar mdavis mdavis package Geo::GoogleEarth::Pluggable;
use strict;
use warnings;
use base qw{Geo::GoogleEarth::Pluggable::Folder};
use XML::LibXML::LazyBuilder qw{DOM E};
use Archive::Zip qw{COMPRESSION_DEFLATED};
use IO::Scalar qw{};
our $VERSION='0.17';
=head1 NAME
Geo::GoogleEarth::Pluggable - Generates GoogleEarth Documents
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(%data); #is a special Folder...
my $folder =$document->Folder(%data); #isa Geo::GoogleEarth::Pluggable::Folder
my $point =$document->Point(%data); #isa Geo::GoogleEarth::Pluggable::Point
my $netlink =$document->NetworkLink(%data); #isa Geo::GoogleEarth::Pluggable::NetworkLink
my $lookat =$document->LookAt(%data); #isa Geo::GoogleEarth::Pluggable::LookAt
my $style =$document->Style(%data); #isa Geo::GoogleEarth::Pluggable::Style
print $document->render;
KML CGI Example
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(name=>"KML Document");
print $document->header,
$document->render;
KMZ CGI Example
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(name=>"KMZ Document");
print $document->header_kmz,
$document->archive;
=head1 DESCRIPTION
Geo::GoogleEarth::Pluggable is a Perl object oriented interface that allows for the creation of XML documents that can be used with Google Earth.
Geo::GoogleEarth::Pluggable (aka Document) is a L with a render method.
=head2 Object Inheritance Graph
--- Constructor -+- Base --- Folder --- Document
| |
| +- Placemark -+- Point
| | +- LineString
| | +- LinearRing
| |
| +- StyleBase -+- Style
| | +- StyleMap
| |
| +- NetworkLink
|
+- LookAt
=head2 Constructors that append to the parent folder object
Folder, NetworkLink, Point, LineString, LinearRing
=head2 Constructors that return objects for future use
LookAt(), Style(), StyleMap()
=head2 Wrappers (what makes it easy)
Style => IconStyle, LineStyle, PolyStyle, LabelStyle, ListStyle
Point => MultiPoint
=head1 USAGE
This is all of the code you need to generate a complete Google Earth document.
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;
$document->Point(name=>"White House", lat=>38.897337, lon=>-77.036503);
print $document->render;
=head1 CONSTRUCTOR
=head2 new
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Name");
=head1 METHODS
=head2 type
Returns the object type.
my $type=$folder->type;
=cut
sub type {"Document"};
=head2 document
Returns the document object.
All objects know to which document they belong even the document itself!
=cut
sub document {shift};
=head2 render
Returns an XML document with an XML declaration and a root name of "Document"
print $document->render;
=cut
sub render {
my $self=shift;
my $d = DOM(E(kml=>{$self->xmlns}, $self->node));
return $d->toString;
}
=head2 archive
Returns a KMZ formatted Zipped archive of the XML document
print $document->archive;
=cut
sub archive {
my $self=shift;
my $azip=Archive::Zip->new;
my $member=$azip->addString($self->render, "doc.kml");
$member->desiredCompressionMethod(COMPRESSION_DEFLATED);
#$member->desiredCompressionLevel(9); #RT60563, RT54827
my $archive=q{};
my $iosh=IO::Scalar->new( \$archive );
$azip->writeToFileHandle($iosh);
$iosh->close;
return $archive;
}
=head2 xmlns
Add or update a namespace
$document->xmlns->{"namespace"}=$url;
Delete a namespace
delete($document->xmlns->{"xmlns:gx"});
Replace all namespaces
$document->{"xmlns"}={namespace=>$url};
Reset to default namespaces
delete($document->{"xmlns"});
=cut
sub xmlns {
my $self=shift;
unless (defined($self->{'xmlns'})) {
$self->{'xmlns'}={
'xmlns' => "http://www.opengis.net/kml/2.2",
'xmlns:gx' => "http://www.google.com/kml/ext/2.2",
'xmlns:kml' => "http://www.opengis.net/kml/2.2",
'xmlns:atom' => "http://www.w3.org/2005/Atom",
};
}
return wantarray ? %{$self->{'xmlns'}} : $self->{'xmlns'};
}
=head2 nextId
This method is in the document since all Styles and StyleMaps are in the document not folders.
my $id=$document->nextId($type); #$type in "Style" or "StyleMap"
=cut
sub nextId {
my $self=shift;
my $type=shift || "Unknown";
$self->{"nextId"}=0 unless defined $self->{"nextId"};
return sprintf("%s-%s-%s", $type, "perl", $self->{"nextId"}++);
}
=head2 header, header_kml
Returns a header appropriate for a web application
Content-type: application/vnd.google-earth.kml+xml
Content-Disposition: attachment; filename=filename.xls
$document->header #embedded in browser
$document->header(filename=>"filename.xls") #download prompt
$document->header(content_type=>"application/vnd.google-earth.kml+xml") #default content type
=cut
*header_kml=\&header;
sub header {
my $self=shift;
my %data=@_;
$data{"content_type"}="application/vnd.google-earth.kml+xml"
unless defined $data{"content_type"};
my $header=sprintf("Content-type: %s\n", $data{"content_type"});
$header.=sprintf(qq{Content-Disposition: attachment; filename="%s";\n},
$data{"filename"}) if defined $data{"filename"};
$header.="\n";
return $header;
}
=head2 header_kmz
Returns a header appropriate for a web application
Content-type: application/vnd.google-earth.kml+xml
Content-Disposition: attachment; filename=filename.xls
$document->header_kmz #embedded in browser
$document->header_kmz(filename=>"filename.xls") #download prompt
$document->header_kmz(content_type=>"application/vnd.google-earth.kmz") #default content type
=cut
sub header_kmz {
my $self=shift;
my %data=@_;
$data{"content_type"}||="application/vnd.google-earth.kmz";
return $self->header(%data);
}
=head1 TODO
=over
=item Support for default Polygon and Line styles that are nicer than GoogleEarth's
=item Support for DateTime object in the constructor that is promoted to the LookAt object.
=item Create a L plugin (Promote tag as name and datetime to LookAt)
=back
=head1 BUGS
Please log on RT and send to the geo-perl email list.
=head1 LIMITATIONS
=head2 Not So Pretty XML
The XML produced by L is not "pretty". If you need pretty XML you must pass the output through xmllint or a simular product.
For example:
perl -MGeo::GoogleEarth::Pluggable -e "print Geo::GoogleEarth::Pluggable->new->render" | xmllint --format -
=head2 Write Only
This package can only write KML and KMZ files. However, if you need to read KML files, please see the L package's C method.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
=head1 COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
=head1 SEE ALSO
L, L, L, L, L
=cut
1;
Geo-GoogleEarth-Pluggable-0.17/t/ 0000755 0001750 0001750 00000000000 14130060237 016040 5 ustar mdavis mdavis Geo-GoogleEarth-Pluggable-0.17/t/006_MultiPolygon.t 0000644 0001750 0001750 00000004337 14051753662 021300 0 ustar mdavis mdavis # -*- perl -*-
use strict;
use warnings;
use Test::More tests => 6;
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable' ); }
my $document=Geo::GoogleEarth::Pluggable->new;
isa_ok ($document, 'Geo::GoogleEarth::Pluggable');
ok(!$document->can("MultiPolygon"), 'Geo::GoogleEarth::Pluggable->cannot("MultiPolygon")');
my $poly=$document->MultiPolygon(
name => "My MultiPolygon",
coordinates => [
[
[
[ -77.03653748373459,38.89168486168970,0 ],
[ -77.03576261856583,38.89048265593675,0 ],
[ -77.03441830249675,38.89048262486622,0 ],
[ -77.03382066054579,38.89099860676128,0 ],
[ -77.03382049686830,38.89103420260221,0 ],
[ -77.03393181272598,38.89181802380578,0 ],
[ -77.03653748373459,38.89168486168907,0 ],
],
],
[
[
[ -77.03681005187295,38.88992462567244,0 ],
[ -77.03931402803416,38.88987985612900,0 ],
[ -77.03928168426064,38.88893661754751,0 ],
[ -77.03668516494257,38.88897638063194,0 ],
[ -77.03681005187295,38.88992462567244,0 ],
],
],
],
);
can_ok($document, "MultiPolygon");
isa_ok($poly, "Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon", '$document->MultiPolygon');
my $xml=$document->render;
diag($xml);
like($xml, qr{}, 'xml has MultiGeometry element');
Geo-GoogleEarth-Pluggable-0.17/t/005_Polygon.t 0000644 0001750 0001750 00000003721 14051753662 020260 0 ustar mdavis mdavis # -*- perl -*-
use strict;
use warnings;
use Test::More tests => 6;
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable' ); }
my $document=Geo::GoogleEarth::Pluggable->new;
isa_ok ($document, 'Geo::GoogleEarth::Pluggable');
ok(!$document->can("Polygon"), 'Geo::GoogleEarth::Pluggable->cannot("Polygon")');
my $poly=$document->Polygon(
name => "My Polygon",
coordinates => [
[
[ -77.05850989868624,38.87005419296352,0 ],
[ -77.05556478330676,38.86887203313995,0 ],
[ -77.05324817642971,38.87060535534778,0 ],
[ -77.05467928811530,38.87289088304318,0 ],
[ -77.05788754338148,38.87255166603090,0 ],
[ -77.05850989868624,38.87005419296352,0 ],
],
[
[ -77.05672359788534,38.87161350448313,0 ],
[ -77.05690397766423,38.87065618430430,0 ],
[ -77.05580255797341,38.87019457781144,0 ],
[ -77.05492001633019,38.87088147519474,0 ],
[ -77.05548840804771,38.87175348954395,0 ],
[ -77.05672359788534,38.87161350448313,0 ],
]
],
);
can_ok($document, "Polygon");
isa_ok($poly, "Geo::GoogleEarth::Pluggable::Contrib::Polygon", '$document->Polygon');
my $xml=$document->render;
diag($xml);
like($xml, qr{}, 'xml has Polygon element');
Geo-GoogleEarth-Pluggable-0.17/t/003_Folder.t 0000644 0001750 0001750 00000001053 14051753662 020036 0 ustar mdavis mdavis # -*- perl -*-
use Test::More tests => 4;
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable' ); }
my $document=Geo::GoogleEarth::Pluggable->new;
isa_ok ($document, 'Geo::GoogleEarth::Pluggable');
$document->{"xmlns"}={};
my $point=$document->Folder(name=>"White House");
isa_ok($point, "Geo::GoogleEarth::Pluggable::Folder", '$document->Folder');
is($document->render, q{
White House
}, '$document->render');
Geo-GoogleEarth-Pluggable-0.17/t/004_Snippet.t 0000644 0001750 0001750 00000002574 14051753662 020257 0 ustar mdavis mdavis # -*- perl -*-
use Test::More tests => 11;
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable' ); }
my $document=Geo::GoogleEarth::Pluggable->new;
isa_ok ($document, 'Geo::GoogleEarth::Pluggable');
$document->{"xmlns"}={};
my $point=$document->Point(lat=>38.89767,
lon=>-77.03655,
Snippet=>["1600 Pennsylvania Avenue NW", "Washington, DC 20500"],
name=>"White House");
isa_ok($point, "Geo::GoogleEarth::Pluggable::Contrib::Point", '$document->Point');
isa_ok($point->Snippet, "ARRAY");
is(scalar(@{$point->Snippet}), "2", 'maxLines');
is($document->render, q{
White House1600 Pennsylvania Avenue NW
Washington, DC 20500-77.03655,38.89767,0
}, '$document->render');
isa_ok($point->Snippet("New"), "ARRAY");
isa_ok($point->Snippet, "ARRAY");
is(scalar(@{$point->Snippet}), "1", 'maxLines');
is($point->Snippet->[0], "New", "Value");
is($document->render, q{
White HouseNew-77.03655,38.89767,0
}, '$document->render');
Geo-GoogleEarth-Pluggable-0.17/t/002_document.t 0000644 0001750 0001750 00000000553 14051753662 020444 0 ustar mdavis mdavis # -*- perl -*-
use Test::More tests => 3;
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable' ); }
my $document=Geo::GoogleEarth::Pluggable->new;
isa_ok ($document, 'Geo::GoogleEarth::Pluggable');
$document->{"xmlns"}={};
is($document->render, q{
}, '$document->render');
Geo-GoogleEarth-Pluggable-0.17/t/001_load.t 0000644 0001750 0001750 00000002422 14051753662 017541 0 ustar mdavis mdavis # -*- perl -*-
use Test::More tests => 19;
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable' ); }
my $object = Geo::GoogleEarth::Pluggable->new ();
isa_ok ($object, 'Geo::GoogleEarth::Pluggable');
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Constructor' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Base' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Contrib::LinearRing' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Contrib::LineString' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Contrib::Point' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Contrib::Polygon' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Folder' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::LookAt' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::NetworkLink' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Placemark' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Plugin::Default' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Plugin::Others' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Plugin::Style' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::StyleBase' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::Style' ); }
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable::StyleMap' ); }
Geo-GoogleEarth-Pluggable-0.17/t/003_Point.t 0000644 0001750 0001750 00000001323 14051753662 017714 0 ustar mdavis mdavis # -*- perl -*-
use Test::More tests => 4;
BEGIN { use_ok( 'Geo::GoogleEarth::Pluggable' ); }
my $document=Geo::GoogleEarth::Pluggable->new;
isa_ok ($document, 'Geo::GoogleEarth::Pluggable');
$document->{"xmlns"}={};
my $point=$document->Point(lat=> " 38.89767 ",
lon=> " -77.03655 ",
name=>"White House");
isa_ok($point, "Geo::GoogleEarth::Pluggable::Contrib::Point", '$document->Point');
is($document->render, q{
White House-77.03655,38.89767,0
}, '$document->render');
Geo-GoogleEarth-Pluggable-0.17/Changes 0000644 0001750 0001750 00000006330 14130060023 017063 0 ustar mdavis mdavis Revision history for Perl module Geo::GoogleEarth::Pluggable
TODO
- Add LookAt capability
my $look=$document->LookAt(datetime=>$datetime || [$datetime1, $datetime2]); #DateTime objects or W3C dateTime formated strings
2011-05-24T14:08:00Z
2011-05-24T14:07:59Z
2011-05-24T14:08:00Z
0.17 2021-10-08
- Updated Makefile.PL to add links to GitHub for metacpan
- Pushed to GitHub
0.16 2016-07-14
- Added Polygon and MultiPolygon support
- Warning: If you have a Plugin that provides Polygon or MultiPolygon methods. These methods will unfortunately override your plugin.
- Note: These function are intended to be compatible with the PostgreSQL ST_AsGeoJSON() function
0.15 2011-01-17
- Fixed HTTP header incoding for Content-Disposition - same as RT73369
0.14 2011-06-25
- Added Package::New capabilities
- Dropped core requires from Makefile.PL
- Added LookAt capability
- Added Geo::GoogleEarth::Pluggable::LookAt package
- Added Folder->LookAt constructor
- Added Base->lookat property
- Updated NetworkLink to support refreshInterval
- Updated Documentation
- Geo/GoogleEarth/Pluggable/Plugin/Style.pm
0.13 2010-12-27
- Updated point_normalize to normalize strings with whitespace and look like numbers as white space is the delimiter in the "cooridnates" element.
- Updated Geo::GoogleEarth::Pluggable::Contrib::Point->subnode as well but why is this not using the point_normalize?
0.12 2010-12-26
- Added snippet capability
- Added Snippet example
- Added tests
0.11 2010-08-20
- Removed desiredCompressionLevel setting due to bug RT54827 - RT60563
- Added kmz option to all example scripts
- Added example scripts
0.10 2010-04-19
- Added description support in Folder and Placemark
0.09 2009-11-27
- Added StyleMap support
- Moved id and url methods from Style to StyleBase module
0.08 2009-11-26
- Modified document->render method to be a wrapper around folder->node
0.07 2009-11-16
- Cleaned up Document->render and Folder->node methods
0.06 2009-11-15
- Minor updates to support Geo::GoogleEarth::Pluggable::Plugin::Styles
0.05 2009-11-11
- Use XML::LibXML to generate XML via XML::LibXML::LazyBuilder
- Implemented IconStyle
0.04 2009-11-10 - Happy Birthday Marines!
- Started work on Style objects and exceeded the capabilites of XML::Simple
0.03 2009-11-02
- Changed setting the "packages" property to using the pushPackages method which now allows testing with constructing the Folder object with Folder(packages=>[MyPackage])
- Removed "use blib;" from Folder object.
0.02 2009-10-29
- Updated prerequisites in Makefile.PL
- Removed Address method (does not appear to work anyway)
- Removed Address object
- Moved LinearRing method to Default plugin
- Moved LinearRing object to Contrib folder
- Added LinearRing example
- Added LineString method to Default plugin
- Added LineString object to Contirb folder
- Added LineString example
- Added default altitude for hash in point_stringify {alt=>0}
- Added all packages to test
0.01 2009-10-28
- original version
Geo-GoogleEarth-Pluggable-0.17/MANIFEST 0000644 0001750 0001750 00000005274 14130060237 016736 0 ustar mdavis mdavis Changes
lib/Geo/GoogleEarth/Pluggable.pm
lib/Geo/GoogleEarth/Pluggable/Constructor.pm
lib/Geo/GoogleEarth/Pluggable/Base.pm
lib/Geo/GoogleEarth/Pluggable/Contrib/LinearRing.pm
lib/Geo/GoogleEarth/Pluggable/Contrib/LineString.pm
lib/Geo/GoogleEarth/Pluggable/Contrib/Point.pm
lib/Geo/GoogleEarth/Pluggable/Contrib/Polygon.pm
lib/Geo/GoogleEarth/Pluggable/Contrib/MultiPolygon.pm
lib/Geo/GoogleEarth/Pluggable/Folder.pm
lib/Geo/GoogleEarth/Pluggable/LookAt.pm
lib/Geo/GoogleEarth/Pluggable/NetworkLink.pm
lib/Geo/GoogleEarth/Pluggable/Placemark.pm
lib/Geo/GoogleEarth/Pluggable/Plugin/Default.pm
lib/Geo/GoogleEarth/Pluggable/Plugin/Others.pm
lib/Geo/GoogleEarth/Pluggable/Style.pm
lib/Geo/GoogleEarth/Pluggable/StyleBase.pm
lib/Geo/GoogleEarth/Pluggable/StyleMap.pm
lib/Geo/GoogleEarth/Pluggable/Plugin/Style.pm
LICENSE
Makefile.PL
MANIFEST
README.md
t/001_load.t
t/002_document.t
t/003_Folder.t
t/003_Point.t
t/004_Snippet.t
t/005_Polygon.t
t/006_MultiPolygon.t
Todo
scripts/generate-kml.pl
scripts/Geo-GoogleEarth-Pluggable-Folder.pl
scripts/Geo-GoogleEarth-Pluggable-Folder.pl.kml
scripts/Geo-GoogleEarth-Pluggable-Folder.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-Folders_with_Points.pl
scripts/Geo-GoogleEarth-Pluggable-Folders_with_Points.pl.kml
scripts/Geo-GoogleEarth-Pluggable-Folders_with_Points.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-LinearRing.pl
scripts/Geo-GoogleEarth-Pluggable-LinearRing.pl.kml
scripts/Geo-GoogleEarth-Pluggable-LinearRing.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-LineString.pl
scripts/Geo-GoogleEarth-Pluggable-LineString.pl.kml
scripts/Geo-GoogleEarth-Pluggable-LineString.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-MultiPoint.pl
scripts/Geo-GoogleEarth-Pluggable-MultiPoint.pl.kml
scripts/Geo-GoogleEarth-Pluggable-MultiPoint.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-NetworkLink.pl
scripts/Geo-GoogleEarth-Pluggable-NetworkLink.pl.kml
scripts/Geo-GoogleEarth-Pluggable-NetworkLink.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-Point.pl
scripts/Geo-GoogleEarth-Pluggable-Point.pl.kml
scripts/Geo-GoogleEarth-Pluggable-Point.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-Point-StyleIcon.pl
scripts/Geo-GoogleEarth-Pluggable-Point-StyleIcon.pl.kml
scripts/Geo-GoogleEarth-Pluggable-Point-StyleIcon.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-Point-StyleMapIcon.pl
scripts/Geo-GoogleEarth-Pluggable-Point-StyleMapIcon.pl.kml
scripts/Geo-GoogleEarth-Pluggable-Point-StyleMapIcon.pl.kmz
scripts/Geo-GoogleEarth-Pluggable-Snippet.pl
scripts/Geo-GoogleEarth-Pluggable-Snippet.pl.kml
scripts/Geo-GoogleEarth-Pluggable-Snippet.pl.kmz
perl-Geo-GoogleEarth-Pluggable.spec
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
Geo-GoogleEarth-Pluggable-0.17/perl-Geo-GoogleEarth-Pluggable.spec 0000644 0001750 0001750 00000003563 14130056176 024237 0 ustar mdavis mdavis Name: perl-Geo-GoogleEarth-Pluggable
Version: 0.17
Release: 1%{?dist}
Summary: Generates GoogleEarth Documents
License: BSD
Group: Development/Libraries
URL: http://search.cpan.org/dist/Geo-GoogleEarth-Pluggable/
Source0: http://www.cpan.org/modules/by-module/Geo/Geo-GoogleEarth-Pluggable-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::Simple) >= 0.44
BuildRequires: perl(Archive::Zip)
BuildRequires: perl(IO::Scalar)
BuildRequires: perl(Method::Autoload)
BuildRequires: perl(Module::Pluggable)
BuildRequires: perl(XML::LibXML::LazyBuilder)
BuildRequires: perl(Package::New)
Requires: perl(Archive::Zip)
Requires: perl(IO::Scalar)
Requires: perl(Method::Autoload)
Requires: perl(Module::Pluggable)
Requires: perl(XML::LibXML::LazyBuilder)
Requires: perl(Package::New)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
Geo::GoogleEarth::Pluggable is a Perl object oriented interface that allows
for the creation of XML documents that can be used with Google Earth.
%prep
%setup -q -n Geo-GoogleEarth-Pluggable-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes LICENSE README.md Todo
%{perl_vendorlib}/*
%{_mandir}/man3/*
%changelog
* Mon Dec 27 2010 Michael R. Davis (mrdvt@cpan.org) 0.12-1
- Specfile autogenerated by cpanspec 1.78.
Geo-GoogleEarth-Pluggable-0.17/Todo 0000644 0001750 0001750 00000000131 14051753662 016435 0 ustar mdavis mdavis TODO list for Perl module Geo::GoogleEarth::Pluggable
See Changes and pod documentation
Geo-GoogleEarth-Pluggable-0.17/README.md 0000644 0001750 0001750 00000013574 14130037546 017075 0 ustar mdavis mdavis # NAME
Geo::GoogleEarth::Pluggable - Generates GoogleEarth Documents
# SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(%data); #is a special Folder...
my $folder =$document->Folder(%data); #isa Geo::GoogleEarth::Pluggable::Folder
my $point =$document->Point(%data); #isa Geo::GoogleEarth::Pluggable::Point
my $netlink =$document->NetworkLink(%data); #isa Geo::GoogleEarth::Pluggable::NetworkLink
my $lookat =$document->LookAt(%data); #isa Geo::GoogleEarth::Pluggable::LookAt
my $style =$document->Style(%data); #isa Geo::GoogleEarth::Pluggable::Style
print $document->render;
KML CGI Example
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(name=>"KML Document");
print $document->header,
$document->render;
KMZ CGI Example
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(name=>"KMZ Document");
print $document->header_kmz,
$document->archive;
# DESCRIPTION
Geo::GoogleEarth::Pluggable is a Perl object oriented interface that allows for the creation of XML documents that can be used with Google Earth.
Geo::GoogleEarth::Pluggable (aka Document) is a [Geo::GoogleEarth::Pluggable::Folder](https://metacpan.org/pod/Geo::GoogleEarth::Pluggable::Folder) with a render method.
## Object Inheritance Graph
--- Constructor -+- Base --- Folder --- Document
| |
| +- Placemark -+- Point
| | +- LineString
| | +- LinearRing
| |
| +- StyleBase -+- Style
| | +- StyleMap
| |
| +- NetworkLink
|
+- LookAt
## Constructors that append to the parent folder object
Folder, NetworkLink, Point, LineString, LinearRing
## Constructors that return objects for future use
LookAt(), Style(), StyleMap()
## Wrappers (what makes it easy)
Style => IconStyle, LineStyle, PolyStyle, LabelStyle, ListStyle
Point => MultiPoint
# USAGE
This is all of the code you need to generate a complete Google Earth document.
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;
$document->Point(name=>"White House", lat=>38.897337, lon=>-77.036503);
print $document->render;
# CONSTRUCTOR
## new
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Name");
# METHODS
## type
Returns the object type.
my $type=$folder->type;
## document
Returns the document object.
All objects know to which document they belong even the document itself!
## render
Returns an XML document with an XML declaration and a root name of "Document"
print $document->render;
## archive
Returns a KMZ formatted Zipped archive of the XML document
print $document->archive;
## xmlns
Add or update a namespace
$document->xmlns->{"namespace"}=$url;
Delete a namespace
delete($document->xmlns->{"xmlns:gx"});
Replace all namespaces
$document->{"xmlns"}={namespace=>$url};
Reset to default namespaces
delete($document->{"xmlns"});
## nextId
This method is in the document since all Styles and StyleMaps are in the document not folders.
my $id=$document->nextId($type); #$type in "Style" or "StyleMap"
## header, header\_kml
Returns a header appropriate for a web application
Content-type: application/vnd.google-earth.kml+xml
Content-Disposition: attachment; filename=filename.xls
$document->header #embedded in browser
$document->header(filename=>"filename.xls") #download prompt
$document->header(content_type=>"application/vnd.google-earth.kml+xml") #default content type
## header\_kmz
Returns a header appropriate for a web application
Content-type: application/vnd.google-earth.kml+xml
Content-Disposition: attachment; filename=filename.xls
$document->header_kmz #embedded in browser
$document->header_kmz(filename=>"filename.xls") #download prompt
$document->header_kmz(content_type=>"application/vnd.google-earth.kmz") #default content type
# TODO
- Support for default Polygon and Line styles that are nicer than GoogleEarth's
- Support for DateTime object in the constructor that is promoted to the LookAt object.
- Create a [GPS::Point](https://metacpan.org/pod/GPS::Point) plugin (Promote tag as name and datetime to LookAt)
# BUGS
Please log on RT and send to the geo-perl email list.
# LIMITATIONS
## Not So Pretty XML
The XML produced by [XML::LibXML](https://metacpan.org/pod/XML::LibXML) is not "pretty". If you need pretty XML you must pass the output through xmllint or a simular product.
For example:
perl -MGeo::GoogleEarth::Pluggable -e "print Geo::GoogleEarth::Pluggable->new->render" | xmllint --format -
## Write Only
This package can only write KML and KMZ files. However, if you need to read KML files, please see the [Geo::KML](https://metacpan.org/pod/Geo::KML) package's `from` method.
# SUPPORT
DavisNetworks.com supports all Perl applications including this package.
# AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
# COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
# SEE ALSO
[Geo::KML](https://metacpan.org/pod/Geo::KML), [XML::LibXML](https://metacpan.org/pod/XML::LibXML), [XML::LibXML::LazyBuilder](https://metacpan.org/pod/XML::LibXML::LazyBuilder), [Archive::Zip](https://metacpan.org/pod/Archive::Zip), [IO::Scalar](https://metacpan.org/pod/IO::Scalar)
Geo-GoogleEarth-Pluggable-0.17/LICENSE 0000644 0001750 0001750 00000002756 14130037317 016617 0 ustar mdavis mdavis The BSD License
Copyright (c) 2009, Michael R. Davis
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the name of the author nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Geo-GoogleEarth-Pluggable-0.17/Makefile.PL 0000644 0001750 0001750 00000003045 14130037776 017565 0 ustar mdavis mdavis use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Geo::GoogleEarth::Pluggable',
VERSION_FROM => 'lib/Geo/GoogleEarth/Pluggable.pm',
AUTHOR => 'Michael R. Davis (domain=>michaelrdavis,tld=>com,account=>perl)',
ABSTRACT_FROM=> 'lib/Geo/GoogleEarth/Pluggable.pm',
PREREQ_PM => {
'Test::Simple' => 0.44,
'Scalar::Util' => 0,
'IO::Scalar' => 0,
'XML::LibXML::LazyBuilder' => 0,
'Archive::Zip' => 0,
'Method::Autoload' => 0,
'Module::Pluggable' => 0,
'Package::New' => 0,
},
LICENSE => 'bsd',
META_MERGE => {
'meta-spec' => { version => 2 },
'resources' => {
homepage => 'https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable',
bugtracker => {
web => 'https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable/issues',
},
repository => {
type => 'git',
url => 'git@github.com:mrdvt92/perl-Geo-GoogleEarth-Pluggable.git',
web => 'https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable.git',
},
},
},
);
Geo-GoogleEarth-Pluggable-0.17/META.yml 0000664 0001750 0001750 00000001660 14130060237 017053 0 ustar mdavis mdavis ---
abstract: 'Generates GoogleEarth Documents'
author:
- 'Michael R. Davis (domain=>michaelrdavis,tld=>com,account=>perl)'
build_requires:
ExtUtils::MakeMaker: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.52, CPAN::Meta::Converter version 2.150001'
license: bsd
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Geo-GoogleEarth-Pluggable
no_index:
directory:
- t
- inc
requires:
Archive::Zip: '0'
IO::Scalar: '0'
Method::Autoload: '0'
Module::Pluggable: '0'
Package::New: '0'
Scalar::Util: '0'
Test::Simple: '0.44'
XML::LibXML::LazyBuilder: '0'
resources:
bugtracker: https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable/issues
homepage: https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable
repository: https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable.git
version: '0.17'
Geo-GoogleEarth-Pluggable-0.17/META.json 0000664 0001750 0001750 00000003004 14130060237 017215 0 ustar mdavis mdavis {
"abstract" : "Generates GoogleEarth Documents",
"author" : [
"Michael R. Davis (domain=>michaelrdavis,tld=>com,account=>perl)"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.52, CPAN::Meta::Converter version 2.150001",
"license" : [
"bsd"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "Geo-GoogleEarth-Pluggable",
"no_index" : {
"directory" : [
"t",
"inc"
]
},
"prereqs" : {
"build" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"Archive::Zip" : "0",
"IO::Scalar" : "0",
"Method::Autoload" : "0",
"Module::Pluggable" : "0",
"Package::New" : "0",
"Scalar::Util" : "0",
"Test::Simple" : "0.44",
"XML::LibXML::LazyBuilder" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable/issues"
},
"homepage" : "https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable",
"repository" : {
"type" : "git",
"web" : "https://github.com/mrdvt92/perl-Geo-GoogleEarth-Pluggable.git"
}
},
"version" : "0.17"
}