#!/usr/bin/perl
if
( $@ ) {
print
"1..1\nok 1\n"
;
warn
"skipping, Geo::ShapeFile not available\n"
;
exit
;
}
if
( $@ ) {
print
"1..1\nok 1\n"
;
warn
"skipping, Geo::Proj4 not available\n"
;
exit
;
}
require
'./t/test_contains.pl'
;
my
$image
= Image::GeoTIFF::Tiled->new(
"./t/samples/usgs1_.tif"
);
my
$proj
= Geo::Proj4->new(
"+proj=utm +zone=17 +ellps=WGS84 +units=m"
)
or
die
"parameter error: "
. Geo::Proj4->error .
"\n"
;
my
$shp
= Geo::ShapeFile->new(
'./t/samples/usgs1_poly'
);
my
$shp_shape
=
$shp
->get_shp_record( 1 );
my
$shape
=
Image::GeoTIFF::Tiled::Shape->load_shape(
$image
,
$shp_shape
,
$proj
);
my
$iter
=
$image
->get_iterator(
$shape
);
$SIG
{ __WARN__ } =
sub
{
local
$_
=
$_
[0];
warn
@_
unless
/-299935.31,1866374.55/
};
test_contains(
$image
,
$iter
,
$shp_shape
,
$proj
);