Geo::Geos::Precision::GeometryPrecisionReducer - Reduces the precision of a Geometry.
use Geo::Geos::Coordinate; use Geo::Geos::PrecisionModel; use Geo::Geos::Precision::GeometryPrecisionReducer; my $pm = Geo::Geos::PrecisionModel->new(2); my $pr = Geo::Geos::Precision::GeometryPrecisionReducer->new($pm); my $gf = Geo::Geos::GeometryFactory::create(); my $c1_1 = Geo::Geos::Coordinate->new(0.123,1); my $c1_2 = Geo::Geos::Coordinate->new(1.348,1); my $ls1 = $gf->createLineString([$c1_1, $c1_2], 2); $pr->setRemoveCollapsedComponents(1); $pr->setPointwise(1); $pr->reduce($ls1); # => isa 'Geo::Geos::Geometry'
GEOS C++ Library
geos::precision::GeometryPrecisionReducer
Geo::Geos
Geo::Geos::Precision
Geo::Geos::PrecisionModel
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.