RDF::K...porter(3pm)

πŸ’– RDF::KML::Exporter πŸ’–

okay bestie, gather round, because this one is a whole vibe. we're looking at RDF::KML::Exporter, straight out of the User Contributed Perl Documentation section, and it does exactly one iconic thing: it takes your RDF geo data and turns it into KML so Google Earth can eat it up. 🌍✨


🌍 NAME 🌍

RDF::KML::Exporter β€” export RDF geo data to KML (Google Earth). that's it. that's the whole serve. no cap. πŸ’…


✨ SYNOPSIS ✨

here's the tea, in code form πŸ«–:

use RDF::KML::Exporter;

my $exporter = RDF::KML::Exporter->new;
my $input    = 'http://dbpedia.org/resource/Lewes';

print $exporter->export_kml($input)->render;

like, that's it. four lines and you're living your best cartography life. πŸ”₯


πŸŽ€ DESCRIPTION πŸŽ€

🧚 Constructor

  • new(%options) β€” hands you back a shiny new RDF::KML::Exporter object, fresh out the box. 🎁

and like... there are no valid options at the moment β€” the hash is just sitting there, reserved for future use. so don't stress about what to pass in, bestie, there's nothing to pass in yet. πŸ™ˆ

πŸ¦‹ Methods

  • export_kml($input, %options) β€” gives you back a KML document containing all the locations in the input, in no particular order. so if you were expecting alphabetization... no. the order is giving chaos and we respect it. 😌

the $input can be a URI, a file name, an RDF::Trine::Model, or honestly anything else that the parse function of RDF::TrineX::Functions can handle. it's very "bring whatever, we'll make it work" energy. πŸ’…

what you get back is an Geo::GoogleEarth::Pluggable instance, which you can turn into XML using its render method. that's the ->render in the synopsis, iykyk. ⭐

🌸 RDF Input

so the input is expected to use the W3C's WGS84 Geo Positioning vocabulary β€” that's <http://www.w3.org/2003/01/geo/wgs84_pos#>, bestie, copy it exactly, no typos. πŸ“Œ

and for place names? those should use rdfs:label. periodt. πŸŽ€


πŸ‘€ SEE ALSO πŸ‘€

go be nosy, it's good for you:


this software is copyright (c) 2011-2012 by Toby Inkster. πŸ’œ

and it's free software β€” you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go forth, remix, share, slay. 🫢


πŸ’€ DISCLAIMER OF WARRANTIES πŸ’€

okay this part is the serious part, no emoji-flavored rewriting here because legal text is legal text:

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: it's yours, it's free, and if it breaks, that's on the universe, not on Toby. 😭


and that's the whole page, bestie!! this was perl v5.32.1, dated 2021-09-11, and it's the RDF::K...porter(3pm) manual β€” love her, respect her, go export some KML. mwah. πŸ’‹πŸŽ€βœ¨

πŸ“¦ where this page comes from