use strict; use warnings; use Test::Base; use Geo::Converter::WKT2KML; plan tests => 1*blocks; filters { input => [qw/chomp/], expected => [qw/chomp/], }; run { my $block = shift; is (wkt2kml($block->input),$block->expected); }; __END__ === test point --- input POINT(6 10) --- expected 6,10 === test linestring --- input LINESTRING(3 4,10 50,20 25) --- expected 3,4 10,50 20,25 === test polygon --- input POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2, 3 2, 3 3, 2 3,2 2)) --- expected 1,1 5,1 5,5 1,5 1,1 2,2 3,2 3,3 2,3 2,2 === test multipoint --- input MULTIPOINT(3.5 5.6,4.8 10.5) --- expected 3.5,5.6 4.8,10.5 === test multilinestring --- input MULTILINESTRING((3 4,10 50,20 25),(-5 -8,-10 -8,-15 -4)) --- expected 3,4 10,50 20,25 -5,-8 -10,-8 -15,-4 === test multipolygon --- input MULTIPOLYGON(((1 1,5 1,5 5,1 5,1 1),(2 2, 3 2, 3 3, 2 3,2 2)),((3 3,6 2,6 4,3 3))) --- expected 1,1 5,1 5,5 1,5 1,1 2,2 3,2 3,3 2,3 2,2 3,3 6,2 6,4 3,3 === test geometrycollection --- input GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10)) --- expected 4,6 4,6 7,10 === test polygon --- input POINT(135.52 -34.56) --- expected 135.52,-34.56 === test multipolygon --- input MULTIPOINT(-94.6 -20.4, 135.87 25.90) --- expected -94.6,-20.4 135.87,25.90 === test linestring --- input LINESTRING(135.52 -34.56, 134.25 24.67,133.25 24.45) --- expected 135.52,-34.56 134.25,24.67 133.25,24.45 === test multilinestring --- input MULTILINESTRING((-94.6 -20.4, 135.87 25.90),(135.52 -34.56, 134.25 24.67),(135.52 -34.56, 134.25 24.67, 23.89 56.76)) --- expected -94.6,-20.4 135.87,25.90 135.52,-34.56 134.25,24.67 135.52,-34.56 134.25,24.67 23.89,56.76 === test polygon-outeronly --- input POLYGON((135.52 -34.56, 134.25 24.67,133.25 24.45,135.52 -34.56)) --- expected 135.52,-34.56 134.25,24.67 133.25,24.45 135.52,-34.56 === test polygon-outin --- input POLYGON((135.52 -34.56, 134.25 24.67,133.25 24.45,135.52 -34.56),(-94.6 -20.4, 135.87 25.90),(135.52 -34.56, 134.25 24.67)) --- expected 135.52,-34.56 134.25,24.67 133.25,24.45 135.52,-34.56 -94.6,-20.4 135.87,25.90 135.52,-34.56 134.25,24.67