Michael,<br><br>It looks like both the images have the transparency issue.<br>Please provide the gdalinfo outputs of the rasters.<br><br>Specifying the extents in gdal_merge.py will definitely speed things up.<br><br>Scaling time has many more variables. It is probably faster in gdal_translate. Also, gdal_translate also has more options of resampling methods.<br>
<br>File size not only depends on the information to to stored but also the encoding. Your original image was compressed more than the output image. If you want, you can specify the compression creation options to the GDAL programs. For tiff formats you can see that options at GTiff driver page[1].<br>
<br>[1]: <a href="http://www.gdal.org/frmt_gtiff.html">http://www.gdal.org/frmt_gtiff.html</a><br><br><div class="gmail_quote">On Thu, Jul 7, 2011 at 6:05 AM, Michael Corey <span dir="ltr"><<a href="mailto:mcorey@cironline.org">mcorey@cironline.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><u></u>
<div bgcolor="#ffffff" text="#000000">
Sure, I've uploaded samples here.<br>
<br>
<a href="http://www.mikejcorey.com/spatial/diablo-box-sample.tif" target="_blank">http://www.mikejcorey.com/spatial/diablo-box-sample.tif</a><br>
<a href="http://www.mikejcorey.com/spatial/diablo-cutout-sample.tif" target="_blank">http://www.mikejcorey.com/spatial/diablo-cutout-sample.tif</a><br>
<br>
These are the same as the images created by the process I described
(but scaled down).<br>
<br>
To your point about specifying size in the first step -- will that
make the process run faster, or does it do the scaling down after it
builds the full-resolution image?<br>
<br>
Also, I notice that my filesize always gets significantly bigger
when I do the cutout step, which seems counter-intuitive to me since
in theory shouldn't there be less information present once the
cutout is done?<br>
<br>
Thanks for your help!<br><font color="#888888">
<pre cols="72">Michael Corey</pre></font><div><div></div><div class="h5">
<br>
On 7/6/11 5:01 PM, Chaitanya kumar CH wrote:
<blockquote type="cite">
<div lang="x-unicode">Michael,<br>
<br>
Can you provide screenshots of
diablo-combined-center-utm10-70pct-box.tif and
diablo-combined-center-utm10-70pct-cutout.tif for comparison?<br>
<br>
By the way, you can perform the actions of the two
gdal_translate commands in the first step with the gdal_merge.py
script itself unless you want to use a specific resampling
algorithm.<br>
<br>
<div class="gmail_quote">On Thu, Jul 7, 2011 at 4:28 AM, Michael
Corey <span dir="ltr"><<a href="mailto:mcorey@cironline.org" target="_blank">mcorey@cironline.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all:<br>
<br>
I'm using a shapefile as a clipping mask to cut out the
shoreline from some DOQ files that I have merged together.
But when I do the clipping step, I end up with unwanted
semitransparency in the non-clipped areas.<br>
<br>
I'm pretty sure the problem is only with my gdalwarp step at
the end.<br>
<br>
Here's my process:<br>
<br>
gdal_merge.py -init "255" -o
diablo-combined-center-utm10.tif file file file file<br>
<br>
gdal_translate -outsize 70% 70%
diablo-combined-center-utm10.tif
diablo-combined-center-utm10-70pct.tif<br>
<br>
ogrinfo -al ./diablo_canyon_detail_clipper.shp<br>
//Extent: (XXXX, YYYY) - (XXXX, YYYY)<br>
<br>
gdal_translate -projwin XXXX YYYY XXXX YYYY
diablo-combined-center-utm10-70pct.tif
diablo-combined-center-utm10-70pct-box.tif<br>
<br>
gdalwarp -co COMPRESS=DEFLATE -cutline
./diablo_canyon_detail_clipper.shp
diablo-combined-center-utm10-70pct-box.tif
diablo-combined-center-utm10-70pct-cutout.tif<br>
<br>
Can anyone help?<br>
<br>
Thanks!<br>
<font color="#888888">
<br>
-- <br>
Michael Corey<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Best regards,<br>
Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>
+91-9494447584<br>
17.2416N 80.1426E<br>
</div>
</blockquote>
</div></div></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>