[FWTools] gdal_translate - what am I missing?

Paul McCullough Paul.McCullough at sfgov.org
Wed Jan 2 14:18:46 EST 2008


All,

I have a mrsid file: 
    sf.sid
    2,119,161,888 bytes
My end goal is to create an image pyramid with geotiffs from this mrsid 
file for use with the geoserver image mosaic plugin.
To that end I am trying to subset this mrsid file with gdal_translate.
It *seems* that I can use gdal_translate successfully on a small area but 
not on relatively large area.

This command appears to work properly for a relatively small area 
(units=feet, projection=epsg:2227)
    gdal_translate -of HFA -projwin 6001765 2096567 6003198 2094764 sf.sid 
test1.img
By "appear" I mean when I *look* at the output using ArcMap, they are 
georeferenced properly and the image appears (qualitatively) to be the 
same as the original.
gdalinfo for test1.img snippets:
    Size is 2866, 3606
    Origin = (6001764.559999999600000,2096567.399999999900000)

Now, here is the command for the larger area:
    gdal_translate -of HFA -projwin 5978648 2131842 6025550 2085070 
mrsid\sf.sid pict2004.img
I see no error and the resulting files include:
    26,337,579,229 pict2004.ige
    22,078 pict2004.img
    11,303 pict2004.img.aux.xml
    11,972 pict2004.img.info
gdalinfo for pict2004.img snippets:
    Size is 93804, 93544
    Origin = (5978647.559999999600000,2131842.399999999900000)
Note the size.

Since this file size from the previous step is unwieldy for visual 
inspection, I subset again just to do a visual inspection:
    gdal_translate -of HFA -projwin 6001765 2096567 6003198 2094764 
pict2004.img test2.img
gdalinfo for test2.img snippets:
    Size is 2866, 3606
    Origin = (6001764.559999999600000,2096567.399999999900000)
When I *look* at test2.img I see the following problems:
1) georeferecning is incorrect
2) aspect ratio is incorrect
3) scale is incorrect

I am obviously missing something - can someone please tell me what it is?

Thanks
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20080102/79dfb030/attachment.html


More information about the FWTools mailing list