<br><font size=2 face="sans-serif">More info...</font>
<br>
<br><font size=2 face="sans-serif">Recal that I said:</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; When I *look* at test2.img
I see the following problems:</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;1) georeferecning is incorrect</font><font size=3>
</font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;2) aspect ratio is incorrect</font><font size=3>
</font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;3) scale is incorrect</font><font size=3> </font>
<br><font size=3>I just found the real location of scene represented by
test2.img.</font>
<br><font size=3>It is about 16000 feet to the west of the </font><font size=2 face="sans-serif">bounding
box in the command line (-projwin 6001765 2096567 6003198 2094764</font><font size=3>)</font>
<br><font size=3>Hmmmm, 16000 is suspicious number.</font>
<br><font size=3>Also, the scale of </font><font size=2 face="sans-serif">test2.img</font><font size=3>
is about 2x larger than it should be.<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Paul McCullough &lt;Paul.McCullough@sfgov.org&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: fwtools-bounces@lists.maptools.org</font>
<p><font size=1 face="sans-serif">01/02/2008 11:18 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">fwtools@lists.maptools.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[FWTools] gdal_translate - what am I
missing?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
All,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I have a mrsid file: &nbsp;</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;sf.sid</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;2,119,161,888 bytes</font><font size=3> </font><font size=2 face="sans-serif"><br>
My end goal is to create an image pyramid with geotiffs from this mrsid
file for use with the geoserver image mosaic plugin.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
To that end I am trying to subset this mrsid file with gdal_translate.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
It *seems* that I can use gdal_translate successfully on a small area but
not on relatively large area.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
This command appears to work properly for a relatively small area (units=feet,
projection=epsg:2227)</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;gdal_translate -of HFA -projwin 6001765 2096567 6003198 2094764
sf.sid test1.img</font><font size=3> </font><font size=2 face="sans-serif"><br>
By &quot;appear&quot; 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.</font><font size=3> </font><font size=2 face="sans-serif"><br>
gdalinfo for test1.img snippets:</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;Size is 2866, 3606</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;Origin = (6001764.559999999600000,2096567.399999999900000)</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Now, here is the command for the larger area:</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;gdal_translate -of HFA -projwin 5978648 2131842 6025550 2085070
mrsid\sf.sid pict2004.img</font><font size=3> </font><font size=2 face="sans-serif"><br>
I see no error and the resulting files include:</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;26,337,579,229 pict2004.ige</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;22,078 pict2004.img</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;11,303 pict2004.img.aux.xml</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;11,972 pict2004.img.info</font><font size=3> </font><font size=2 face="sans-serif"><br>
gdalinfo for pict2004.img snippets:</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;Size is 93804, 93544</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;Origin = (5978647.559999999600000,2131842.399999999900000)</font><font size=3>
</font><font size=2 face="sans-serif"><br>
Note the size.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Since this file size from the previous step is unwieldy for visual inspection,
I subset again just to do a visual inspection:</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;gdal_translate -of HFA -projwin 6001765 2096567 6003198 2094764
pict2004.img test2.img</font><font size=3> </font><font size=2 face="sans-serif"><br>
gdalinfo for test2.img snippets:</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;Size is 2866, 3606</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;Origin = (6001764.559999999600000,2096567.399999999900000)</font><font size=3>
</font><font size=2 face="sans-serif"><br>
When I *look* at test2.img I see the following problems:</font><font size=3>
</font><font size=2 face="sans-serif"><br>
1) georeferecning is incorrect</font><font size=3> </font><font size=2 face="sans-serif"><br>
2) aspect ratio is incorrect</font><font size=3> </font><font size=2 face="sans-serif"><br>
3) scale is incorrect</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I am obviously missing something - can someone please tell me what it is?</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Thanks</font><font size=3> </font><font size=2 face="sans-serif"><br>
Paul</font><font size=3> </font><font size=2><tt>_______________________________________________<br>
FWTools mailing list<br>
FWTools@lists.maptools.org<br>
http://lists.maptools.org/mailman/listinfo/fwtools<br>
http://fwtools.maptools.org/<br>
</tt></font>
<br>