XML::Loy::GeoRSS - GeoRSS (Simple) Format Extension
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 http://georss.org/simple|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_even
$atom->geo_even(40);
Add even element.
even
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 them.
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-2013, 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.