summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkindex.pl11
1 files changed, 5 insertions, 6 deletions
diff --git a/mkindex.pl b/mkindex.pl
index 085074b..6f23d68 100755
--- a/mkindex.pl
+++ b/mkindex.pl
@@ -267,10 +267,10 @@ GetOptions( "q|quiet" => sub { delete $config{progress} }
pod2usage(2);
}
}
- , "s_srs=s" => sub { $config{s_srs} = Geo::OSR::SpatialReference::->new();
- $config{s_srs}->SetFromUserInput( $_[1] ) }
- , "t_srs=s" => sub { $config{t_srs} = Geo::OSR::SpatialReference::->new();
- $config{t_srs}->SetFromUserInput( $_[1] ) }
+ , "s_srs=s" => sub { my %h = ( WKT => Geo::OSR::GetUserInputAsWKT($_[1]) );
+ $config{s_srs} = Geo::OSR::SpatialReference::->new(%h); }
+ , "t_srs=s" => sub { my %h = ( WKT => Geo::OSR::GetUserInputAsWKT($_[1]) );
+ $config{t_srs} = Geo::OSR::SpatialReference::->new(%h); }
, "man" => sub { pod2usage(-exitstatus => 0, -verbose => 2) }
)
or pod2usage(2);
@@ -567,9 +567,8 @@ sub annotate {
# Inverse the transformation, so that we can convert from projected
# coordinates to pixel coordinates.
my $ds = Geo::GDAL::Open($filename, 'ReadOnly') or exit 1;
- my ($ok,@invt) = Geo::GDAL::InvGeoTransform([ $ds->GetGeoTransform() ]);
+ my @invt = Geo::GDAL::InvGeoTransform([ $ds->GetGeoTransform() ]);
undef $ds;
- die "Error: Couldn't inverse affine transformation\n" unless $ok;
my $raster = Image::Magick::->new();
$raster->Read( $filename );