Hi,

Here's how I can read in some geotiffs that I downloaded from the
GeoEye website.


use PDL;

#read in a single band image
my $singleBand  = rim("po_120502_pan_0000000.tif");
#print part of the original image
print $singleBand ->slice("60:80,60:80");


#read in a 3 band image, and assign each band to a variable
$threeBands  = rim("po_119995_rgb_0000000.tif");
($a, $b, $c) = dog($threeBands);
#print part of the first band of the image
print $a->slice("60:80,60:80");




On Fri, Mar 6, 2009 at 8:50 AM, P Kishor <[email protected]> wrote:
> Greets,
>
> So, I have finally moved beyond installing (more on that elsewhere),
> and am trying to read/write geotiffs. As I understand, PDL by itself
> reads and writes PNM only, and optionally JPEGs, and uses NetPBM for
> translating between various other formats.
>
> Now, I have NetPBM installed successfully, and I have libtiff
> installed as well. I am expecting everything to just work, but I am
> sure I am experiencing a 'user error' moment here.
>
> ----
> perldl> @foo = PDL->rpiccan()
>
> perldl> print @foo
> JPEG PNM
>
> perldl> use PDL::AutoLoader
>
> perldl> $tif = 
> '/Users/punkish/Projects/Learning_PDL/cartagena_geotiff/49573847\49573847.tif'
>
> perldl> $img = PDL->rpic($tif, {FORMAT => 'TIFF'})
> PDL: Oops, this is not a PNM file
> Caught at file (eval 47), line 4, pkg main
> ----
>
> Please hold my hand.
>
>
> --
> Puneet Kishor http://www.punkish.org/
> Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
> Carbon Model http://carbonmodel.org/
> Open Source Geospatial Foundation http://www.osgeo.org/
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to