NAME
Geo::Geos::Noding::SimpleSnapRounder - Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of SegmentStrings.
SYNOPSIS
use Geo::Geos::Coordinate;
use Geo::Geos::PrecisionModel;
use Geo::Geos::Noding::SimpleSnapRounder;
use Geo::Geos::Noding::NodedSegmentString;
my $c1 = Geo::Geos::Coordinate->new(0,1);
my $c2 = Geo::Geos::Coordinate->new(2,1);
my $c3 = Geo::Geos::Coordinate->new(1,0);
my $c4 = Geo::Geos::Coordinate->new(1,2);
my $pm = Geo::Geos::PrecisionModel->new(2.0);
my $ssr = Geo::Geos::Noding::SimpleSnapRounder->new($pm); # => isa 'Geo::Geos::Noding::SimpleSnapRounder'
Geo::Geos::Noding::SimpleSnapRounder->new($pm); # => isa 'Geo::Geos::Noding::Noder'
my $ss1 = Geo::Geos::Noding::NodedSegmentString->new([$c1, $c2, $c3, $c4]);
$ssr->computeNodes([$ss1]);
my $substr = $ssr->getNodedSubstrings->[0]; # => isa 'Geo::Geos::Noding::SegmentString'
my $cnt = scalar(@{$ssr->getNodedSubstrings}); # => 4
my $ss2 = Geo::Geos::Noding::NodedSegmentString->new([$c1, $c2]);
$ssr->computeVertexSnaps([$ss2]);
SEE ALSO (C++ classes docs)
geos::noding::snapround::SimpleSnapRounder
SEE ALSO
Geo::Geos::Noding::SegmentString
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.