[gdal-dev] cutting up large TIFF files with gdal_translate

Zoltan Szecsei zoltans at geograph.co.za
Wed Aug 22 09:38:52 PDT 2012


Hi,
I have a large image bounded by:

Upper Left  (  447007.599, 7132849.501) ( 32d28'15.03"E, 25d55'19.12"S)
Lower Left  (  447007.599, 7127851.511) ( 32d28'14.30"E, 25d58' 1.59"S)
Upper Right (  451005.901, 7132849.501) ( 32d30'38.75"E, 25d55'19.63"S)
Lower Right (  451005.901, 7127851.511) ( 32d30'38.08"E, 25d58' 2.10"S)

and I would like to cut it up into 1Km squares starting on the 447000 
7133000 boundary.
The problem is that using:
gdal_translate -of JPEG -projwin $tlx $tly $brx $bry  m_36s.tif 
m_36s_${r}${c}.jpg

gives me:
Computed -srcwin -152 97030 20008 20008 from projected window.
Computed -srcwin falls outside raster size of 79999x100001.

Whilst the error is understandible, I was hoping that extra pixels would 
be automatically inserted as no_data values to make up my 1km tiles.

I'm not sure if -outsize will help me or not.
(ie: I first increase the area of my original tiff image so that it is 
larger than my required tiles, and then cut it up as above)

Is this the function of -outsize ?

Any suggestions how I should go about this issue?

Thanks & regards,
Zoltan



-- 

===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
P.O. Box 7, Muizenberg 7950, South Africa.

65 Main Road, Muizenberg 7945
Western Cape, South Africa.

34° 6'16.35"S 18°28'5.62"E

Tel: +27-21-7884897  Mobile: +27-83-6004028
Fax: +27-86-6115323     www.geograph.co.za
===========================================



More information about the gdal-dev mailing list