Geo::Geos::WKTWriter - Writes a Geometry into Well-Known Text format.
use Geo::Geos::GeometryFactory; use Geo::Geos::WKTReader; my $gf = Geo::Geos::GeometryFactory::create(); my $c = Geo::Geos::Coordinate->new(1,2); my $p = $gf->createPoint($c); my $roundingPrecision = 5; my $trim = 0; Geo::Geos::WKTWriter->new($roundingPrecision, $trim); # => isa 'Geo::Geos::WKTWriter' Geo::Geos::WKTWriter->new($roundingPrecision); # => isa 'Geo::Geos::WKTWriter' Geo::Geos::WKTWriter->new; # => isa 'Geo::Geos::WKTWriter' my $writer = Geo::Geos::WKTWriter->new; $writer->setTrim(1); $writer->setRoundingPrecision(16); $writer->write($p); # => 'POINT (1 2)'
GEOS C++ Library
geos::io::WKTWriter
Geo::Geos
Geo::Geos::Geometry
Geo::Geos::WKTReader
Ivan Baidakou <i.baydakov@crazypanda.ru>, Crazy Panda, CP Decision LTD
You may distribute this code under the same terms as Perl itself.
To install Geo::Geos, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Geos
CPAN shell
perl -MCPAN -e shell install Geo::Geos
For more information on module installation, please visit the detailed CPAN module installation guide.