Geo::Geos::Noding::SegmentString - An interface for classes which represent a sequence of contiguous line segments.
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/
GEOS C++ Library
geos::noding::SegmentString
Geo::Geos
Geo::Geos::Noding::BasicSegmentString
Geo::Geos::Noding::NodedSegmentString
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.