<div dir="ltr">Mike, <div>Are you setting <span style="font-size:12.8000001907349px">padfDstNoDataReal as well?     Because GDAL performs the warp in chunks I'm wondering if previously written data, that should be NoData, is not recognized as such with later chunks.   However, I'm still not clear on the exact details of how that works internally, Even would have a better idea if this even makes sense.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div>The code I'm using to set WarpOptions for doing warping on multiple input images to a single outout looks like the below.   Also, are you setting INIT_DEST option to "NODATA" (it's one of the key-value options that are assigned to <span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre">psWarpOptions->papszWarpOptions).    </span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre"><br></span></div><div><font color="#333333" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;line-height:16.7999992370605px;white-space:pre">Hope this helps!</span></font></div><div><br></div><div><table class="" style="border-collapse:collapse;border-spacing:0px;color:rgb(51,51,51);font-family:Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,'Segoe UI Emoji','Segoe UI Symbol';font-size:13px;line-height:18.2000007629395px"><tbody><tr><td id="L316" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC316" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        GDALWarpOptions *psWarpOptions = <span class="" style="color:rgb(0,134,179)">GDALCreateWarpOptions</span>();</td></tr><tr><td id="L317" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC317" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        psWarpOptions->hDstDS = imgout.<span class="" style="color:rgb(0,134,179)">GetGDALDataset</span>();</td></tr><tr><td id="L318" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC318" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        psWarpOptions->nBandCount = imgout.<span class="" style="color:rgb(0,134,179)">NumBands</span>();</td></tr><tr><td id="L319" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC319" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        psWarpOptions->panSrcBands = (<span class="" style="color:rgb(167,29,93)">int</span> *) <span class="" style="color:rgb(0,134,179)">CPLMalloc</span>(<span class="" style="color:rgb(167,29,93)">sizeof</span>(<span class="" style="color:rgb(167,29,93)">int</span>) * psWarpOptions->nBandCount );</td></tr><tr><td id="L320" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC320" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        psWarpOptions->panDstBands = (<span class="" style="color:rgb(167,29,93)">int</span> *) <span class="" style="color:rgb(0,134,179)">CPLMalloc</span>(<span class="" style="color:rgb(167,29,93)">sizeof</span>(<span class="" style="color:rgb(167,29,93)">int</span>) * psWarpOptions->nBandCount );</td></tr><tr><td id="L321" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC321" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        psWarpOptions->padfSrcNoDataReal = (<span class="" style="color:rgb(167,29,93)">double</span> *) <span class="" style="color:rgb(0,134,179)">CPLMalloc</span>(<span class="" style="color:rgb(167,29,93)">sizeof</span>(<span class="" style="color:rgb(167,29,93)">double</span>) * psWarpOptions->nBandCount );</td></tr><tr><td id="L322" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC322" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        psWarpOptions->padfSrcNoDataImag = (<span class="" style="color:rgb(167,29,93)">double</span> *) <span class="" style="color:rgb(0,134,179)">CPLMalloc</span>(<span class="" style="color:rgb(167,29,93)">sizeof</span>(<span class="" style="color:rgb(167,29,93)">double</span>) * psWarpOptions->nBandCount );</td></tr><tr><td id="L323" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC323" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        psWarpOptions->padfDstNoDataReal = (<span class="" style="color:rgb(167,29,93)">double</span> *) <span class="" style="color:rgb(0,134,179)">CPLMalloc</span>(<span class="" style="color:rgb(167,29,93)">sizeof</span>(<span class="" style="color:rgb(167,29,93)">double</span>) * psWarpOptions->nBandCount );</td></tr><tr><td id="L324" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC324" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        psWarpOptions->padfDstNoDataImag = (<span class="" style="color:rgb(167,29,93)">double</span> *) <span class="" style="color:rgb(0,134,179)">CPLMalloc</span>(<span class="" style="color:rgb(167,29,93)">sizeof</span>(<span class="" style="color:rgb(167,29,93)">double</span>) * psWarpOptions->nBandCount );</td></tr><tr><td id="L325" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC325" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        <span class="" style="color:rgb(167,29,93)">for</span> (<span class="" style="color:rgb(167,29,93)">unsigned</span> <span class="" style="color:rgb(167,29,93)">int</span> b=<span class="" style="color:rgb(0,134,179)">0</span>;b<imgout.<span class="" style="color:rgb(0,134,179)">NumBands</span>();b++) {</td></tr><tr><td id="L326" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC326" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">            psWarpOptions->panSrcBands[b] = b+<span class="" style="color:rgb(0,134,179)">1</span>;</td></tr><tr><td id="L327" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC327" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">            psWarpOptions->panDstBands[b] = b+<span class="" style="color:rgb(0,134,179)">1</span>;</td></tr><tr><td id="L328" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC328" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">            psWarpOptions->padfSrcNoDataReal[b] = images[<span class="" style="color:rgb(0,134,179)">0</span>][b].<span class="" style="color:rgb(0,134,179)">NoDataValue</span>();</td></tr><tr><td id="L329" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC329" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">            psWarpOptions->padfDstNoDataReal[b] = imgout[b].<span class="" style="color:rgb(0,134,179)">NoDataValue</span>();</td></tr><tr><td id="L330" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC330" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">            psWarpOptions->padfSrcNoDataImag[b] = <span class="" style="color:rgb(0,134,179)">0.0</span>;</td></tr><tr><td id="L331" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC331" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">            psWarpOptions->padfDstNoDataImag[b] = <span class="" style="color:rgb(0,134,179)">0.0</span>;</td></tr><tr><td id="L332" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC332" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal">        }
</td></tr></tbody></table></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 16, 2015 at 1:42 PM, Michael Aschenbeck <span dir="ltr"><<a href="mailto:m.g.aschenbeck@gmail.com" target="_blank">m.g.aschenbeck@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for your reply.<br><br>I'm using gdal 1.10.1.  I'm using cubic resampling, but i have noticed the dark line artifact with bilinear as well.  I unfortunately do not reproduce the problem with a basic gdalwarp with cubic resampling.<br><br>I have written this code to do some registration. It's hard to tell in the example, but my transformation actually pushed pixels up a bit. The transformation I use handles interior pixels nicely and extends beyond the image, so there is nothing 'weird' going on with that near the boundary that I can think of.<br><br>I was hoping there is a warp option i have not yet thought of.<br><br>Thanks again,<br>Mike<br><br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 16, 2015 at 11:10 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Le jeudi 16 avril 2015 19:01:57, Michael Aschenbeck a écrit :<br>
> Hello,<br>
><br>
> I'm using ChunkAndWarpMulti to warp an image.  The warping is working<br>
> nicely, however, at the boundary I seem to be getting some artifacts.<br>
><br>
> The first artifact i see is a DARK boundary of pixels in some location.  My<br>
> guess is that the interpolator is interpolating with blackfill (intensity<br>
> zero pixels).  Note that I am using the following setup:<br>
> psWarpOptions->padfSrcNoDataReal = (double *)<br>
> CPLMalloc(psWarpOptions->nBandCount*sizeof(double));<br>
> for (int ii = 0; ii < psWarpOptions->nBandCount; ii++)<br>
> {<br>
> psWarpOptions->padfSrcNoDataReal[ii] = 0;<br>
> }<br>
> which i thought was supposed to treat zeros as nodata.  It doesn't seem to<br>
> be doing what I think it should.<br>
><br>
> In some cases, I am also noticing a BRIGHT band strip of pixels adjacent to<br>
> the dark boundary pixels.  I don't have any thoughts on where this artifact<br>
> is coming from.<br>
><br>
> Below you can find links to an example.  The orange you see is just the<br>
> background color of my viewer.  Zero pixels are set to transparent so you<br>
> can see the dark boundary artifact.  (Note that all of the orange region is<br>
> covered with zero-intensity pixels, so we haven't reached the boundary of<br>
> the file, just the boundary of the non-zero pixels.)  Sorry if that's<br>
> confusing.<br>
> The before image: <a href="https://www.dropbox.com/s/3kmyi8wu0qybsq9/before.JPG?dl=0" target="_blank">https://www.dropbox.com/s/3kmyi8wu0qybsq9/before.JPG?dl=0</a><br>
> The after image with the artifacts:<br>
> <a href="https://www.dropbox.com/s/fo0m8q95b26s61m/after.JPG?dl=0" target="_blank">https://www.dropbox.com/s/fo0m8q95b26s61m/after.JPG?dl=0</a><br>
><br>
<br>
</div></div>Mike,<br>
<br>
Which gdal version ? Which resampling method ?<br>
Do you reproduce with gdalwarp ?<br>
If so, providing input file + full gdalwarp command line would help.<br>
<span><font color="#888888"><br>
Even<br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><br>
</font></span></blockquote></div><br></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></div>