HTML::...at::geo(3pm)
π NAME π
HTML::Microformats::Format::geo β it's the geo microformat, bestie. That's it, that's the whole vibe. geoooo π
This is the HTML::...at::geo(3pm) page from your friendly neighbourhood User Contributed Perl Documentation, so like. strap in.
β¨ SYNOPSIS β¨
use Data::Dumper;
use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::geo;
my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @geos = HTML::Microformats::Format::geo->extract_all(
$dom->documentElement, $context);
foreach my $geo (@geos)
{
printf("%s;%s\n", $geo->get_latitude, $geo->get_longitude);
}
okay so that's literally it. build a context, pull every geo out of the document element, loop over them, print lat/long separated by a semicolon. iconic behaviour, no notes. π
πΈ DESCRIPTION πΈ
So HTML::Microformats::Format::geo inherits from HTML::Microformats::Format. Family tree moment. If you wanna know about the property getter/setter methods, the constructors, all that lore β go read the base class definition, because it's all described over there. This page isn't gonna repeat it, bestie, that's just how inheritance works. π
π¦ Additional Method π¦
to_kmlβ this one exports the geo object as KML. But listen. It needsRDF::KML::Exporterto actually work, and if that module isn't available it will straight up throw an error at run-time. So like, install your deps before you come for this method, okay? π
π MICROFORMAT π
HTML::Microformats::Format::geo supports geo exactly as described over at <http://microformats.org/wiki/geo> β with these additions, because of course there are additions, we're extra like that:
- 'altitude' property β you can hand over an altitude as either a plain number (which is taken to be metres above sea level) or as an embedded
hMeasure. e.g.:
<span class="geo">
lat: <span class="latitude">12.34</span>,
long: <span class="longitude">56.78</span>,
alt: <span class="altitude">90</span> metres.
</span>
<span class="geo">
lat: <span class="latitude">12.34</span>,
long: <span class="longitude">56.78</span>,
alt: <span class="altitude hmeasure">
<span class="num">90</span>
<span class="unit">m</span>
</span>.
</span>
See? two ways. both slay. pick your fighter. π«Ά
- 'body' and 'reference-frame' β normally the geo microformat is only defined for WGS84 co-ordinates on Earth. Boring, I know. But with the
'body'and'reference-frame'properties β each of which takes string values, just so we're clear β you can give co-ordinates on other planets, asteroids, moons, etc; or on Earth but using a non-WGS84 system. mars geo tag? yes bestie, go off. πͺ
β RDF OUTPUT β
Data comes back using the W3C's vCard vocabulary (<http://www.w3.org/2006/vcard/ns#>) and the W3C's WGS84 vocabulary (<http://www.w3.org/2003/01/geo/wgs84_pos#>).
And for non-WGS84 co-ordinates? UNGEO (<http://buzzword.org.uk/rdf/ungeo#>) is used instead. different vocab for different vibes, as it should be. π
π BUGS π
Please report any bugs to <http://rt.cpan.org/>. Not to me. I'm just the messenger. π
π SEE ALSO π
HTML::Microformats::Format, HTML::Microformats, HTML::Microformats::Format::hCard.
iykyk π
π§ AUTHOR π§
Toby Inkster <tobyink@cpan.org>. legend, honestly. π
πΈ COPYRIGHT AND LICENCE πΈ
Copyright 2008-2012 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π DISCLAIMER OF WARRANTIES π
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Translation: no promises, bestie. it is what it is. π
okay that's the whole page!! this one's from perl v5.32.1, dated 2021-09-12 β yes it's giving vintage but she still eats. πβ¨ bye bye, go tag some co-ordinates. π
π¦ where this page comes from
- debian bookworm: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms