XML::Loy::GeoRSS - GeoRSS (Simple) Format Extension
use XML::Loy::Atom; my $atom = XML::Loy::Atom->new('entry'); $atom->extension(-GeoRSS); my $geo = $atom->geo_where; $geo->geo_point(4.56, 5.67); say $geo->geo_point->[0];
XML::Loy::GeoRSS is an extension for XML::Loy base classes and provides addititional functions for the work with geographic location as described in the specification. This represents the simple variant rather than the GML flavour.
This module is an early release! There may be significant changes in the future.
XML::Loy::GeoRSS inherits all methods from XML::Loy and implements the following new ones.
geo_box
# Add box $atom->geo_box(4, 5, 9, 8); $atom->geo_box(7, 8, 12, 15); say $atom->geo_box->[1]->[0]; # 9 say $atom->geo_box(1)->[1]->[0]; # 12
Add box element based on two coordinates, or get box.
box
geo_circle
# Add circle $atom->geo_circle(14.5, 20.4, 13); say $atom->geo_circle->[0]->[1]; # 20.4 say $atom->geo_circle->[1]; # 13
Add circle element based on one coordinate and a value for radius, or get circle.
circle
geo_elev
$atom->geo_elev(40);
Add elev element.
elev
geo_floor
$atom->geo_floor(46);
Add floor element.
floor
geo_line
$atom->geo_line(45.34, -23.67, 16.3, 17.89); $atom->geo_line(45.34, -23.67, 16.3, 17.89, 15.4, 17.3); say $atom->geo_line->[0]->[0]; # 45.34 say $atom->geo_line(1)->[2]->[0]; # 15.4
Add line element based on at least 2 coordinates, or get coordinates.
line
geo_point
# Add point $atom->geo_point(4.56, 5.67); say $atom->geo_point->[0]; # 4.56
Add point element based on one coordinate, or get it.
point
geo_polygon
$atom->geo_polygon(45.34, -23.67, 16.3, 17.89, 15.4, 17.3); say $atom->geo_polygon->[2]->[0]; # 15.4
Add polygon element based on at least 3 coordinates, or get coordinates.
polygon
geo_property
$atom->geo_property( relationshiptag => 'test', featuretypetag => [qw/foo bar/] );
Add geo features by means of relationshiptag, featuretypetag or featurename element.
relationshiptag
featuretypetag
featurename
geo_radius
$atom->geo_radius(17);
Add radius element.
radius
geo_where
my $where = $atom->geo_where; $where->geo_point(4, 5);
Add where element.
where
Mojolicious.
https://github.com/Akron/XML-Loy
Copyright (C) 2011-2015, Nils Diewald.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl.
To install XML::Loy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Loy
CPAN shell
perl -MCPAN -e shell install XML::Loy
For more information on module installation, please visit the detailed CPAN module installation guide.