<div dir="ltr">Some good ideas, thanks for the suggestions.<div><br></div><div>I added padfDstNoDataReal, as well as the imaginary values. I also set INIT_DEST to NODATA, although from what I read that was more of an option that affected speed. Unfortunately my output was identical to the previous run and the artifacts remain present.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 16, 2015 at 11:59 AM, Matt Hanson <span dir="ltr"><<a href="mailto:matt.a.hanson@gmail.com" target="_blank">matt.a.hanson@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">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-wrap">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-wrap"><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-wrap">Hope this helps!</span></font></div><div><br></div><div><table 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 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> GDALWarpOptions *psWarpOptions = <span style="color:rgb(0,134,179)">GDALCreateWarpOptions</span>();</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->hDstDS = imgout.<span style="color:rgb(0,134,179)">GetGDALDataset</span>();</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->nBandCount = imgout.<span style="color:rgb(0,134,179)">NumBands</span>();</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->panSrcBands = (<span style="color:rgb(167,29,93)">int</span> *) <span style="color:rgb(0,134,179)">CPLMalloc</span>(<span style="color:rgb(167,29,93)">sizeof</span>(<span style="color:rgb(167,29,93)">int</span>) * psWarpOptions->nBandCount );</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->panDstBands = (<span style="color:rgb(167,29,93)">int</span> *) <span style="color:rgb(0,134,179)">CPLMalloc</span>(<span style="color:rgb(167,29,93)">sizeof</span>(<span style="color:rgb(167,29,93)">int</span>) * psWarpOptions->nBandCount );</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->padfSrcNoDataReal = (<span style="color:rgb(167,29,93)">double</span> *) <span style="color:rgb(0,134,179)">CPLMalloc</span>(<span style="color:rgb(167,29,93)">sizeof</span>(<span style="color:rgb(167,29,93)">double</span>) * psWarpOptions->nBandCount );</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->padfSrcNoDataImag = (<span style="color:rgb(167,29,93)">double</span> *) <span style="color:rgb(0,134,179)">CPLMalloc</span>(<span style="color:rgb(167,29,93)">sizeof</span>(<span style="color:rgb(167,29,93)">double</span>) * psWarpOptions->nBandCount );</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->padfDstNoDataReal = (<span style="color:rgb(167,29,93)">double</span> *) <span style="color:rgb(0,134,179)">CPLMalloc</span>(<span style="color:rgb(167,29,93)">sizeof</span>(<span style="color:rgb(167,29,93)">double</span>) * psWarpOptions->nBandCount );</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->padfDstNoDataImag = (<span style="color:rgb(167,29,93)">double</span> *) <span style="color:rgb(0,134,179)">CPLMalloc</span>(<span style="color:rgb(167,29,93)">sizeof</span>(<span style="color:rgb(167,29,93)">double</span>) * psWarpOptions->nBandCount );</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> <span style="color:rgb(167,29,93)">for</span> (<span style="color:rgb(167,29,93)">unsigned</span> <span style="color:rgb(167,29,93)">int</span> b=<span style="color:rgb(0,134,179)">0</span>;b<imgout.<span style="color:rgb(0,134,179)">NumBands</span>();b++) {</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->panSrcBands[b] = b+<span style="color:rgb(0,134,179)">1</span>;</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->panDstBands[b] = b+<span style="color:rgb(0,134,179)">1</span>;</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->padfSrcNoDataReal[b] = images[<span style="color:rgb(0,134,179)">0</span>][b].<span style="color:rgb(0,134,179)">NoDataValue</span>();</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->padfDstNoDataReal[b] = imgout[b].<span style="color:rgb(0,134,179)">NoDataValue</span>();</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->padfSrcNoDataImag[b] = <span style="color:rgb(0,134,179)">0.0</span>;</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> psWarpOptions->padfDstNoDataImag[b] = <span style="color:rgb(0,134,179)">0.0</span>;</td></tr><tr><td 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 style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre-wrap;overflow:visible;word-wrap:normal"> }
</td></tr></tbody></table></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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><div><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></div></div>_______________________________________________<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></blockquote></div><br></div>
</blockquote></div><br></div>