Hi,
2011/10/30 Frank Warmerdam <[email protected]>:
> On 11-10-29 02:00 PM, Komяpa wrote:
>>
>> Hi,
>>
>> 2011/10/29 Frank Warmerdam<[email protected]>:
>>>
>>> On 11-10-29 12:18 PM, Komяpa wrote:
>>>>
>>>> Still, there are some things I would like to clear / discuss.
>>>>
>>>> 1) gdaladdo final.tif 2 4 8 16 32 64 128 256 makes not beautiful
>>>> overviews. If I add -r average, some artifacts start appearing, like
>>>> the vertical stripes on the link above. Any good ways to fix that?
>>>
>>> Darafei
>>>
>>> I would be interested in reproducing this at my end and investigating.
>>> Could you provide something I can work with? I presume the issue
>>> relates to the average overview builder not understanding nodata
>>> masking. Are you using GDAL "trunk"?
>>
>> You can grab geotiffs from http://dev.latlon.org/tiff/baloon/
>> Mapserver map file: http://dev.latlon.org/tiff/all.map
>
> Hi,
>
> I spent a bunch of time tracing through the average resampling kernel
> and I think I have found an issue. However, it does not seem to be the
> cause of the problem. It appears that your files start with the right
> most column of pixels with the mask set when it shouldn't be ... for
> instance in the file IMG_0990_modified.oam.tif.
>
> I established this by running:
>
> gdal_translate -b mask IMG_0990_modified.oam.tif mask.tif
>
> and then carefully examining the right most column of mask.tif.
>
> How was this generated? I think we need to go back to that step.
Originally these files are made from jpegs with qgis Georeferencer plugin.
After that, they were optimized with slighlty edited script from
manual page I mentioned in the frist post.
Here it is:
export GDAL_TIFF_INTERNAL_MASK=YES
for filename in $*
do
export outfile=`echo $filename| sed s/.tif/.oam.tif/g`
#echo $outfile
echo "nearblack" $filename
rm /tmp/prewarp.tif
nearblack $filename -co TILED=YES -setmask -nb 0 -of GTiff -o
/tmp/prewarp.tif
echo "warping" $filename
rm /tmp/warped.tif
gdalwarp -co TILED=YES -dstalpha -t_srs EPSG:3857
/tmp/prewarp.tif /tmp/warped.tif
rm /tmp/prewarp.tif
echo "compressing" $filename
rm /tmp/final.tif
gdal_translate -co TILED=YES -co JPEG_QUALITY=80 -co COMPRESS=JPEG
-co PHOTOMETRIC=YCBCR -b 1 -b 2 -b 3 -mask 4 /tmp/warped.tif
/tmp/final.tif
rm /tmp/warped.tif
echo "adding overview" $filename
gdaladdo /tmp/final.tif 2 4 8 16 32 64 128
echo "moving back"
mv /tmp/final.tif $outfile
done
After running that script, I probably run another gdaladdo with other
-r parameters.
If you need, I can try to publish uncompressed geotiffs for that data
set. There are tiffs that were generated (for other dataset) before I
first seen jpeg tiff compression manual, they're on
http://dev.latlon.org/tiff/plane/
--
Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
xmpp:[email protected] mailto:[email protected]
_______________________________________________
talk mailing list
[email protected]
http://host134.hostmonster.com/mailman/listinfo/talk_openaerialmap.org