<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.Shkpostityyli17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The image ”two_separate_files.png” reveals the reason. If you look at the seam between the images the left side image and right side images do
 not share the same common canvas (pixels are not placed into same common grid). The area that you have marked as “000 nodata” has not received any image data from either image in warping. The warping algorithm has got a result like “51 % of this pixel is nodata,
 I stamp this pixel to nodata” or perhaps “the center of this pixel is nodata, thus the pixel is nodata”. When the result is “nodata” for both left and right, there will be a seam.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Milo van der Linden suggests to try different resampling algorithms. It will not help because it does not affect the decision if the pixel is data
 or nodata. On the Mapserver side other resampling methods than the default Nearest neighbor can give some visual help by blurring the seam but it is not a real solution.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Solution that usually helps is the one I have posted to this list in 2014-08-29 and it is to force the individually warped images to use a common
 canvas by running gdalwarp with parameters –tr and –tap. You have answered that you tried it with -tr 0.36 0.36 –tap but that did not help. I left you alone then, sorry for that. By the way, is “two_separate_files.png” from this experiment? I suppose not.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I should have asked if 0.36 m is the native resolution of your original images. If the pixel size is less than the native one there may still be
 room for the double-nodata pixels. I have used –tr 0.5 –tap when my originals have 0.5 m resolution with perfect results.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I would have a new trial with –tr and –tap.  If that does not help there are two more things to try:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">- Create a mosaic in the original SRS before warping. You can create a .vrt file with gdalbuildvrt without wasting any disk space. Run gdalwarp
 from the .VRT file and cut the results into tiles if you need them with gdalwart target extents parameter “-te xmin ymin xmax ymax”.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">- If –tap does not compute good aligned target extents you can compute them yourself. Here is Python code snippet that we used for several years
 before –tap options existed for widening the output extents to full meters<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">                           minmax = get_minmax(tm32_coords)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">                           minmax_wider = [<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">                                                       (int(math.floor(minmax[0][0])), int(math.floor(minmax[0][1]))),<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">                                                       (int(math.ceil (minmax[1][0])), int(math.ceil (minmax[1][1]))),<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">                           ]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">                           log("Extents (min,max): " + str(minmax), outfilename)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">                           log("Widened extents (min,max): " + str(minmax_wider), outfilename)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">However, the ultimate thing to do is re-consider if it is necessary at all to warp the original images into EPSG:3857. Mapserver warps pretty fast
 on-the-fly and I have not warped a single image after the introduction of support for different native projections in tileindex. See the –t_srs option
<a href="http://www.gdal.org/gdaltindex.html">http://www.gdal.org/gdaltindex.html</a>. For utilizing this feature Mapserver 6.4 or higher is needed.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">Burkot wrote:<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">Dear MS Users<br>
<br>
Please look at the attachement and maybe you will recognize the problem. I think some of you could have encoun</span>tered this problem with one pixel gap between rasterfiles in tileindex layer?<br>
<br>
<br>
Description:<br>
I have a set of rasters which I warped to epsg:3857 projection using gdalwarp.<br>
During the reprojecting the new raster had been rotated by small angle.<br>
After that I created a tileindex shape file using gdaltindex and configured layer:<br>
<span style="font-size:7.5pt">LAYER<br>
        NAME "myname"<br>
        TILEINDEX "tilindex.shp"<br>
        TYPE RASTER<br>
        OFFSITE 0 0 0      <br>
    END</span><br>
<br>
On the result map I see the gaps between raster files in the layer. (See the attachment).<br>
Mayby there is a option in gdalwarp command to extend the new image by making it 1 pixel widther? May by something like resampling method or algorithm?<br>
Could you please pint me to the solution of this problem?<br>
<br>
Thanks in advance<br>
<br>
Bartek<br>
<br>
<br>
<o:p></o:p></p>
</div>
</div>
</body>
</html>