The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Geo::Geos::Noding::SegmentString - An interface for classes which represent a sequence of contiguous line segments.

SYNOPSIS

use Geo::Geos::Coordinate;
use Geo::Geos::Noding::BasicSegmentString;
use Geo::Geos::Noding::NodedSegmentString;

my $c1 = Geo::Geos::Coordinate->new(1,2);
my $c2 = Geo::Geos::Coordinate->new(5,2);
my $c3 = Geo::Geos::Coordinate->new(7,1);

my $seq = [$c1, $c2, $c3];
my $ss = Geo::Geos::Noding::BasicSegmentString->new($seq);   # => isa 'Geo::Geos::Noding::SegmentString'
Geo::Geos::Noding::NodedSegmentString->new($seq);            # => isa 'Geo::Geos::Noding::SegmentString'

$ss->isClosed;          # => ''
$ss->size;              # => 3

$ss->getCoordinate(0);              # => Geo::Geos::Coordinate->new(1,2)
my $c = $ss->getCoordinates->[0];   # => Geo::Geos::Coordinate->new(1,2)

$ss->toString;              # => like qr/\QLINESTRING(1 2, 5 2, 7 1)\E/

SEE ALSO (C++ classes docs)

GEOS C++ Library

geos::noding::SegmentString

SEE ALSO

Geo::Geos

Geo::Geos::Noding::BasicSegmentString

Geo::Geos::Noding::NodedSegmentString

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.