53dcac28cb50fce9857597ae1e8fa78fca9fcd0a
[Map-Splat.git] / t / splat.t
1 #!perl
2 use 5.006;
3 use strict;
4 use warnings FATAL => 'all';
5 use Test::More;
6
7 plan tests => 2;
8
9 use Map::Splat;
10 my $map = Map::Splat->new(
11   lon => -122.279,
12   lat => 37.939,
13   height => 300,
14   freq => 2460,
15   azimuth => 200,
16   h_width => 180,
17   v_width => 20,
18   tilt => 2,
19   max_loss => 180,
20   min_loss => 30,
21 );
22 $map->calculate;
23 ok( defined $map->box, 'bounding box exists' );
24 ok( defined $map->png, 'PNG generated' );
25
26 $map->image->Write('splat.png');
27 use File::Slurp 'write_file';
28 write_file 'mask.png', $map->mask;
29