Geo::Geos::MultiPolygon - Models a collection of Polygons.
use Geo::Geos::Coordinate; use Geo::Geos::GeometryFactory; my $gf = Geo::Geos::GeometryFactory::create(); my $c1 = Geo::Geos::Coordinate->new(1,2); my $c2 = Geo::Geos::Coordinate->new(5,2); my $c3 = Geo::Geos::Coordinate->new(5,0); my $c4 = Geo::Geos::Coordinate->new(1,0); my $lr1 = $gf->createLinearRing([$c1, $c2, $c3, $c4, $c1], 2); my $p1 = $gf->createPolygon($lr1); my $cx1 = Geo::Geos::Coordinate->new(15, 15); my $cx2 = Geo::Geos::Coordinate->new(4, 15); my $cx3 = Geo::Geos::Coordinate->new(4, 5); my $cx4 = Geo::Geos::Coordinate->new(15, 5); my $lr2 = $gf->createLinearRing([$cx1, $cx2, $cx3, $cx4, $cx1], 2); my $p2 = $gf->createPolygon($lr2); $gf->createMultiPolygon([$p1, $p2]); # => isa 'Geo::Geos::MultiPolygon' $gf->createMultiPolygon([$p1, $p2]); # => isa 'Geo::Geos::Polygonal' $gf->createMultiPolygon([$p1, $p2]); # => isa 'Geo::Geos::GeometryCollection'
See methods in the base class Geo::Geos::Geometry.
GEOS C++ Library
geos::geom::MultiPolygon
Geo::Geos
Geo::Geos::Geometry
Geo::Geos::GeometryCollection
Geo::Geos::GeometryFactory
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.