=head1 NAME

Geo::Geos::Noding::IntersectionAdder - Computes the intersections between two line segments in SegmentString and adds them to each string.

=head1 SYNOPSIS

    use Geo::Geos::Coordinate;
    use Geo::Geos::PrecisionModel;
    use Geo::Geos::Noding::NodedSegmentString;
    use Geo::Geos::Noding::IntersectionAdder;


    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;

    my $ss1 = Geo::Geos::Noding::NodedSegmentString->new([$c1, $c2]);
    my $ss2 = Geo::Geos::Noding::NodedSegmentString->new([$c3, $c4]);


    my $li = Geo::Geos::Algorithm::LineIntersector->new($pm);

    my $ia = Geo::Geos::Noding::IntersectionAdder->new($li);     # => isa 'Geo::Geos::Noding::IntersectionAdder'
    Geo::Geos::Noding::IntersectionAdder->new($li);              # => isa 'Geo::Geos::Noding::SegmentIntersector'

    $ia->isDone;                # => ''
    $ia->getLineIntersector;    # => isa 'Geo::Geos::Algorithm::LineIntersector'

    my $segIndex0 = 0;
    my $segIndex1 = 0;
    $ia->processIntersections($ss1, $segIndex0, $ss2, $segIndex1);

    $li->hasIntersection;   # => success
    $ia->isDone;            # always false  => ''

    $ia->hasProperIntersection;             # => success
    $ia->hasIntersection;                   # => success
    $ia->hasProperInteriorIntersection;     # => success
    $ia->hasInteriorIntersection;           # => success

=head1 SEE ALSO (C++ classes docs)

L<GEOS C++ Library|https://trac.osgeo.org/geos>

geos::noding::IntersectionAdder

=head1 SEE ALSO

L<Geo::Geos>

L<Geo::Geos::Algorithm::LineIntersector>

L<Geo::Geos::Noding::NodedSegmentString>

L<Geo::Geos::Noding::SegmentIntersector>

=head1 AUTHOR

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

=head1 LICENSE

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

=cut
