[FWTools] gdal_translate - what am I missing?

Paul McCullough Paul.McCullough at sfgov.org
Wed Jan 2 15:03:37 EST 2008


More info...

Recal that I said:
    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 just found the real location of scene represented by test2.img.
It is about 16000 feet to the west of the bounding box in the command line 
(-projwin 6001765 2096567 6003198 2094764)
Hmmmm, 16000 is suspicious number.
Also, the scale of test2.img is about 2x larger than it should be.




Paul McCullough <Paul.McCullough at sfgov.org> 
Sent by: fwtools-bounces at lists.maptools.org
01/02/2008 11:18 AM

To
fwtools at lists.maptools.org
cc

Subject
[FWTools] gdal_translate - what am I missing?







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 _______________________________________________
FWTools mailing list
FWTools at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20080102/15c0ab8e/attachment.html


More information about the FWTools mailing list