NAME

Geo::Geos::WKTWriter - Writes a Geometry into Well-Known Text format.

SYNOPSIS

    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)'

SEE ALSO (C++ classes docs)

GEOS C++ Library

geos::io::WKTWriter

Geo::Geos

Geo::Geos::Geometry

Geo::Geos::WKTReader

AUTHOR

Ivan Baidakou <i.baydakov@crazypanda.ru>, Crazy Panda, CP Decision LTD

LICENSE

You may distribute this code under the same terms as Perl itself.