Geo::C...WKT2KML(3pm)
π Geo::C...WKT2KML(3pm) β the glow-up β¨
okay bestie, welcome to the Geo::Converter::WKT2KML</p> manual page (the whole thing lives under Geo::C...WKT2KML(3pm) in your perldoc roster, and yes it's a User Contributed Perl Documentation moment). It's a simple converter between WKT and KML and honestly? it does exactly what it says on the tin. no cap. π
πΈ NAME πΈ
Geo::Converter::WKT2KML β a simple converter between WKT and KML</b>. that's the whole vibe. two geometry languages, one tiny module, zero drama. π
β¨ SYNOPSIS β¨
okay so here's how you call it, no biggie:
use Geo::Converter::WKT2KML;
# Convert WKT to KML's geometry fragment
wkt2kml('POINT(135 35)');
# Convert KML's geometry fragment to KML
kml2wkt('<Point><coordinates>135,35</coordinates></Point>');
literally that's it. you hand it a string, it hands you a different string. iconic behavior π¦
π DESCRIPTION π
so this module gives you two functions, wkt2kml and kml2wkt. they convert geometry formats WKT (Well-Known Text) and KML into each other. it's giving translator bestie. π«Ά
β οΈ real talk though β this module can only interpret the geometry fragment of KML. it cannot interpret full-spec KML. so don't come at it with a whole document and expect magic.
the only elements it understands are:
PointLineStringPolygonMultiGeometry- (the ones below are child elements of the ones above π)
coordinatesLinearRingouterBoundaryIsinnerBoundaryIs
as for WKT β same energy, it does not understand the full spec either. "POINT ZM ..." and "POLYGON EMPTY" are cannot interpreted, periodt. π
the only commands it understands are:
POINTMULTIPOINTLINESTRINGMULTILINESTRINGPOLYGONMULTIPOLYGONGEOMETRYCOLLECTION
π EXPORT π
wkt2kml($wkt)β returns a KML geometry fragment. gimme WKT, I gimme back that KML β¨kml2wkt($kml_fragment)β returns WKT. gimme the KML fragment, you get WKT back π
π§ INTERNAL METHOD π§
these are the lil backstage crew β hands off unless you're feeling brave:
"wkt2kmlparser""wkt2kmlformatter""coordformatter""kml2wktbuilder""coordbuilder"
π DEPENDENCIES π
it needs its friends to function, bestie:
"Exporter""XML::Simple""Test::Base""XML::Parser"
π BUGS AND LIMITATIONS π
this module is under test phase. it needs many test cases to find bugs. so likeβ¦ it's in its experimental era. π
sending test cases is welcome! genuinely, if you find something cursed, send it over. π
π AUTHOR π
OHTSUKA Ko-hei "<nene@kokogiko.net>" β the main character who wrote this. π
β LICENCE AND COPYRIGHT β
Copyright (c) 2008, OHTSUKA Ko-hei "<nene@kokogiko.net>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. (that's the whole artistic license situation, iykyk π)
π₯ DISCLAIMER OF WARRANTY π₯
okay so this part is all caps on purpose and I'm keeping it word-for-word because it's literally the legal text and we do not freestyle legal text:
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
π and that's a wrap on Geo::C...WKT2KML(3pm)! this lil render came from perl v5.40.1, dated 2025-10-01, and it's filed under the User Contributed Perl Documentation section. mwah, go convert some geometry, bestie. π
β¨π¦
π¦ where this page comes from
- ubuntu resolute: libgeo-converter-wkt2kml-perl 0.0.3-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgeo-converter-wkt2kml-perl 0.0.3-2 Β· 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