diff options
author | Mark Wells <mark@freeside.biz> | 2016-04-22 13:36:13 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-04-22 13:36:13 -0700 |
commit | 0fa4cb99554008d229834423afa0550065e11028 (patch) | |
tree | bff3ffd72c07de7bc1dbf2b60f113cad90948f50 /t/splat.t |
Import original source of Map-Splat 0.01
Diffstat (limited to 't/splat.t')
-rw-r--r-- | t/splat.t | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/t/splat.t b/t/splat.t new file mode 100644 index 0000000..53dcac2 --- /dev/null +++ b/t/splat.t @@ -0,0 +1,29 @@ +#!perl +use 5.006; +use strict; +use warnings FATAL => 'all'; +use Test::More; + +plan tests => 2; + +use Map::Splat; +my $map = Map::Splat->new( + lon => -122.279, + lat => 37.939, + height => 300, + freq => 2460, + azimuth => 200, + h_width => 180, + v_width => 20, + tilt => 2, + max_loss => 180, + min_loss => 30, +); +$map->calculate; +ok( defined $map->box, 'bounding box exists' ); +ok( defined $map->png, 'PNG generated' ); + +$map->image->Write('splat.png'); +use File::Slurp 'write_file'; +write_file 'mask.png', $map->mask; + |