view release on metacpan or search on metacpan
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use Math::Permute::Lists;
use Math::Permute::Partitions;
use Math::PhaseOnlyCorrelation;
use Math::PlanePath;
use Math::PlanePath::Toothpick;
use Math::Polygon;
use Math::Polygon::Tree;
use Math::Polyhedra;
use Math::Polynom;
use Math::Polynomial;
use Math::Polynomial::Horner;
use Math::Polynomial::Multivariate;
view all matches for this distribution
view release on metacpan or search on metacpan
Everything.pm view on Meta::CPAN
Math::Pari
Math::PercentChange
Math::Polygon
Math::Polygon::Tree
Math::Polyhedra
Math::Polynomial
view all matches for this distribution
view release on metacpan or search on metacpan
Notes/cpan-namespaces/cpan-namespaces-L1-L2.txt view on Meta::CPAN
Math::Partition
Math::PercentChange
Math::Permute
Math::PhaseOnlyCorrelation
Math::PlanePath
Math::Polygon
Math::Polyhedra
Math::Polynom
Math::Polynomial
Math::Preference
Math::Primality
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Geo/EOP.pod view on Meta::CPAN
L</Geo::ISO19139>,
L</Geo::EOP>,
L</Geo::Point>,
L</Geo::Proj4>,
L</Geo::WKT>, and
L</Math::Polygon>.
Please post questions or ideas to
F<https://list.hut.fi/mailman/listinfo/geo-perl|the Geo-Perl mailinglist>
=head1 COPYRIGHTS
view all matches for this distribution
view release on metacpan or search on metacpan
examples/output.txt view on Meta::CPAN
'50.7006272'
],
$VAR1->{PRODUCT_METADATA}{footprint}{GS_comp}[0]{MS_outer}{MP_points}[0]
]
}, 'Geo::Line' )
}, 'Math::Polygon::Surface' )
]
}, 'Geo::Surface' ),
footprint_map => bless( {
G_proj => 'utm31-wgs84',
GS_comp => [
examples/output.txt view on Meta::CPAN
'5616600.000'
],
$VAR1->{PRODUCT_METADATA}{footprint_map}{GS_comp}[0]{MS_outer}{MP_points}[0]
]
}, 'Geo::Line' )
}, 'Math::Polygon::Surface' )
]
}, 'Geo::Surface' ),
METADATA_L1_FILE_NAME => 'L5198024_02420060725_MTL.txt',
PROCESSING_SOFTWARE => 'LPGS_9.3.0',
PRODUCT_LINES_REF => '7361',
view all matches for this distribution
view release on metacpan or search on metacpan
b/build-data.pl view on Meta::CPAN
#!/usr/bin/perl
$|=1;
use strict;
use Geo::ShapeFile;
use Math::Polygon;
use Data::Dumper;
use lib "../lib";
use lib "lib";
use Geo::Location::TimeZone;
b/build-data.pl view on Meta::CPAN
foreach my $point( $lshape->get_part( $s ) ){
push @points, [$point->X, $point->Y];
}
# Create the polygon.
my $poly = Math::Polygon->new( @points );
# What is the bounding box for this?
my ($xmin, $ymin, $xmax, $ymax) = $poly->bbox;
b/build-data.pl view on Meta::CPAN
if( $diddel ){
print STDERR "Removed $diddel points leaving " . scalar @masspoints . " \n";
# Recreate the poly using the
# reduced set of points.
# print STDERR "Recreating the polygon: " . join( ",", @masspoints ) . " X\n";
$newpoly = Math::Polygon->new( @masspoints );
}
}
# Save this zone if something different
b/build-data.pl view on Meta::CPAN
my $maxarea = -1;
my $maxname = undef;
foreach my $rkey( sort keys %{$data{"$xc"}{"$yc"}} ){
next if( $rkey eq "o" );
if( ! defined( $data{"$xc"}{"$yc"}{"$rkey"}{"a"} ) ){
my $newpoly = Math::Polygon->new( @{$data{"$xc"}{"$yc"}{"$rkey"}{"p"}} );
$data{"$xc"}{"$yc"}{"$rkey"}{"a"} = $newpoly->area();
}
if( $data{"$xc"}{"$yc"}{"$rkey"}{"a"} > $maxarea || $maxarea == -1 ){
$maxarea = $data{"$xc"}{"$yc"}{"$rkey"}{"a"};
$maxname = $rkey;
b/build-data.pl view on Meta::CPAN
if( defined( $maxname ) ){
my @bbox = &expandbox( $xc, $yc );
my @points = ();
push @points, [$bbox[0],$bbox[1]];
push @points, [$bbox[2],$bbox[3]];
my $npoly = Math::Polygon->new( @points );
# If there is only one polygon, and the area
# is less than the bounding box, then we
# need to retain it in the output.
if( $maxarea < $npoly->area && $recheck{"$xc"}{"$yc"} > 1 ){
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Geo/Line.pm view on Meta::CPAN
package Geo::Line;
use vars '$VERSION';
$VERSION = '0.99';
use base qw/Geo::Shape Math::Polygon/;
use strict;
use warnings;
use Carp;
lib/Geo/Line.pm view on Meta::CPAN
}
$args{proj} = $proj;
}
ref $thing
or return shift->Math::Polygon::new(%args);
# instance method: clone!
$thing->Math::Polygon::new
( ring => $thing->{GL_ring}
, filled => $thing->{GL_fill}
, proj => $thing->proj
, %args
);
lib/Geo/Line.pm view on Meta::CPAN
sub init($)
{ my ($self, $args) = @_;
$self->Geo::Shape::init($args);
$self->Math::Polygon::init($args);
$self->{GL_ring} = $args->{ring} || $args->{filled};
$self->{GL_fill} = $args->{filled};
$self->{GL_bbox} = $args->{bbox};
$self;
lib/Geo/Line.pm view on Meta::CPAN
{ my $self = shift;
my $other = shift;
return 0 if $self->nrPoints != $other->nrPoints;
$self->Math::Polygon::equal($other->in($self->proj), @_);
}
sub bbox() { shift->Math::Polygon::bbox }
sub area()
{ my $self = shift;
croak "ERROR: area requires a ring of points"
unless $self->isRing;
$self->Math::Polygon::area;
}
sub perimeter()
{ my $self = shift;
croak "ERROR: perimeter requires a ring of points."
unless $self->isRing;
$self->Math::Polygon::perimeter;
}
sub length() { shift->Math::Polygon::perimeter }
sub clip(@)
{ my $self = shift;
my $proj = $self->proj;
lib/Geo/Line.pm view on Meta::CPAN
my $type = $line->isFilled ? 'filled'
: $line->isRing ? 'ring'
: 'line';
"$type\[$proj](".$line->Math::Polygon::string.')';
}
*string = \&toString;
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Geo/WKT.pm view on Meta::CPAN
sub _list_of_points(@)
{ my @points
= @_ > 1 ? @_
: ref $_[0] eq 'ARRAY' ? @{$_[0]}
: $_[0]->isa('Math::Polygon') ? $_[0]->points
: $_[0];
my @s = map
{ (ref $_ ne 'ARRAY' && $_->isa('Geo::Point'))
? $_->x.' '.$_->y
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HiPi/Graphics/DrawingContext.pm view on Meta::CPAN
$self->draw_pixel( @$point, 1);
}
}
# _point_in_polygon
# Learned from latest Math::Polygon but that isn't in Raspbian Stretch
# and we only want this single function. There are no improvements here.
sub _point_in_polygon {
my $point = shift;
return 0 if @_ < 3;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/Polygon/Tree.pm view on Meta::CPAN
package Math::Polygon::Tree;
$Math::Polygon::Tree::VERSION = '0.08';
# ABSTRACT: fast check if point is inside polygon
# $Id$
lib/Math/Polygon/Tree.pm view on Meta::CPAN
$subparts->[$i]->[$j] = 1;
next;
}
# complex subpart
$subparts->[$i]->[$j] = Math::Polygon::Tree->new( @slice_parts, (%opt ? \%opt : ()) );
}
}
return $self;
}
lib/Math/Polygon/Tree.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
Math::Polygon::Tree - fast check if point is inside polygon
=head1 VERSION
version 0.08
=head1 SYNOPSIS
use Math::Polygon::Tree;
my $poly = [ [0,0], [0,2], [2,2], ... ];
my $bound = Math::Polygon::Tree->new( $poly );
if ( $bound->contains( [1,1] ) ) { ... }
=head1 DESCRIPTION
Math::Polygon::Tree creates a tree of polygon parts for fast check if object is inside this polygon.
This method is effective if polygon has hundreds or more segments.
=head1 METHODS
=head2 new
lib/Math/Polygon/Tree.pm view on Meta::CPAN
Contour is an arrayref of points:
my $poly1 = [ [0,0], [0,2], [2,2], ... ];
...
my $bound = Math::Polygon::Tree->new( $poly1, $poly2, ..., \%opt );
or a .poly file
my $bound1 = Math::Polygon::Tree->new( \*STDIN );
my $bound2 = Math::Polygon::Tree->new( 'boundary.poly' );
Options:
prepare_rough
lib/Math/Polygon/Tree.pm view on Meta::CPAN
my $center_point = polygon_centroid( [ [1,1], [1,2], [2,2], ... ] );
Returns polygon's weightened center.
Math::Polygon 1.02+ has the same function, but it is very inaccurate.
=head2 polygon_contains_point
my $is_inside = polygon_contains_point($point, $polygon);
Function that tests if polygon contains point (modified one from Math::Polygon::Calc).
Returns -1 if point lays on polygon's boundary
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/Polygon.pm view on Meta::CPAN
#oodist: *** DO NOT USE THIS VERSION FOR PRODUCTION ***
#oodist: This file contains OODoc-style documentation which will get stripped
#oodist: during its release in the distribution. You can use this file for
#oodist: testing, however the code of this development version may be broken!
package Math::Polygon;{
our $VERSION = '2.00';
}
use strict;
use warnings;
use Log::Report 'math-polygon';
# Include all implementations
use Math::Polygon::Calc;
use Math::Polygon::Clip;
use Math::Polygon::Transform;
#--------------------
sub new(@)
{ my $thing = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Politics/AU/Geo.pm view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use Storable 2.20 ();
use Math::Polygon 1.01 ();
use Params::Util 0.38 ();
use ORLite::Mirror 1.15 ();
our $VERSION = '0.01';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Renard/Block/Format/PDF/Document.pm view on Meta::CPAN
use Renard::Incunabula::Outline;
use Renard::Incunabula::Document::Types qw(PageNumber ZoomLevel);
use Renard::Incunabula::Common::Types qw(InstanceOf);
use Math::Trig;
use Math::Polygon;
use String::Tagged;
use Function::Parameters;
lib/Renard/Block/Format/PDF/Document.pm view on Meta::CPAN
my ($info) = @_;
my $theta_deg = $info->{rotate} // 0;
my $theta_rad = $theta_deg * pi / 180;
my ($x, $y) = ($info->{x}, $info->{y});
my $poly = Math::Polygon->new(
points => [
[0, 0],
[$x, 0],
[$x, $y],
[0, $y],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Renard/Incunabula/Format/PDF/Document.pm view on Meta::CPAN
use Renard::Incunabula::Format::PDF::Page;
use Renard::Incunabula::Outline;
use Renard::Incunabula::Document::Types qw(PageNumber ZoomLevel);
use Math::Trig;
use Math::Polygon;
use Function::Parameters;
extends qw(Renard::Incunabula::Document);
lib/Renard/Incunabula/Format/PDF/Document.pm view on Meta::CPAN
my ($info) = @_;
my $theta_deg = $info->{rotate} // 0;
my $theta_rad = $theta_deg * pi / 180;
my ($x, $y) = ($info->{x}, $info->{y});
my $poly = Math::Polygon->new(
points => [
[0, 0],
[$x, 0],
[$x, $y],
[0, $y],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Sim/OPT/Modish.pm view on Meta::CPAN
use List::AllUtils qw(sum);
use Statistics::Basic qw(:all);
use Data::Dump qw(dump);
use Regexp::Common;
use Vector::Object3D::Polygon;
use Math::Polygon::Tree;
use Storable qw(store retrieve dclone);
#use Parallel::ForkManager;
use feature 'say';
no strict;
no warnings;
lib/Sim/OPT/Modish.pm view on Meta::CPAN
foreach my $case ( @boxvertxy )
{
$vert_xys = $boxvertxy[$count];
$vert_xzs = $boxvertxz[$count];
$vert_yzs = $boxvertyz[$count];
$polyxy = Math::Polygon::Tree->new( $vert_xys );
$polyxz = Math::Polygon::Tree->new( $vert_xzs );
$polyyz = Math::Polygon::Tree->new( $vert_yzs );
$count++;
}
my $count = 0;
my @newbox;
view all matches for this distribution
view release on metacpan or search on metacpan
"List::BinarySearch" : "0.25",
"List::BinarySearch::XS" : "0.09",
"List::MoreUtils" : "0.425",
"List::Unique::DeterministicOrder" : "0",
"List::Util" : "1.45",
"Math::Polygon" : "0",
"Math::Random::MT::Auto" : "6.21",
"Path::Class" : "0",
"PkgConfig" : "0.21026",
"Readonly" : "0",
"Ref::Util" : "0.101",
view all matches for this distribution
view release on metacpan or search on metacpan
* HAFAS: Fix enum error in ÃBB service
* HAFAS: Add RSAG service definition
Travel::Status::DE::DeutscheBahn 6.06 - Sun Aug 11 2024
* HAFAS: Remove undocumented Math::Polygon dependency that was accidentally
added in 6.05
* HAFAS: Add STV, RMV, VMT, VRN service definitions
Travel::Status::DE::DeutscheBahn 6.05 - Sun Aug 11 2024
view all matches for this distribution
view release on metacpan or search on metacpan
* HAFAS: Fix enum error in ÃBB service
* HAFAS: Add RSAG service definition
Travel::Status::DE::DeutscheBahn 6.06 - Sun Aug 11 2024
* HAFAS: Remove undocumented Math::Polygon dependency that was accidentally
added in 6.05
* HAFAS: Add STV, RMV, VMT, VRN service definitions
Travel::Status::DE::DeutscheBahn 6.05 - Sun Aug 11 2024
view all matches for this distribution