<div dir="ltr"><div><div><div><div>Hi,<br></div>While investigating on some rendering 
issues we have with java JAI based operations involving interpolations, I
 have found the topic of bicubic interpolation introducing values 
outside of the input dynamic, as well as negative values and 
overshooting.<br><br></div>The problem we had was with a grayscale GeoTIFF with noData=0.<br>For
 some very dark area (pixel near to zero) the output of the 
interpolation was a negative value being clamped to zero (which is 
noData).<br></div>So it was introducing noData in regions where all pixels were valid.<br><br></div>Therefore I did a test with gdal_translate -r cubic and I got same result:<br><br><img src="cid:ii_j0uosug41_15b19199afd1610e" width="462" height="141"><br>​<div>on the left side: original image<br></div><div>on the right side: cubic interpolation <br></div><div>weird white shapes you see on the top right are zero/nodata pixels.<br></div><div><br></div><div>I got different result once using cubic spline instead.<br></div><div>What is the difference between the two algorithms?<br><br></div><div>Second question:<br></div><div>I did a gdal_translate -outsize 800% 800% from a small pixellated image.<br></div><div>is it expected to have output pixels exceeding the original shape of the valid input pixels?<br></div><div>I was thinking the interpolated image pixels should stay within the original pixel edges.<br><br>Let me provide an image to clarify:<br><img src="cid:ii_j0uos8bz0_15b19192a6d0b3e8" width="462" height="118"><br>​<br>​<br></div><div>Left image: original<br>Right image: cubic spline.<br>See
 how the 2 edges are different, having the cubic spline producing some 
kind of buffering on the edge (note the white-missing pixels on the 
borders are nodata).<br></div><div><br></div><div>Please, let me know.<br></div><div>Best Regards,<br></div><div>Daniele<br></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="font-size:12.8px">==</span><br></div><div dir="ltr"><span style="font-size:12.8px">GeoServer Professional Services from the experts! Visit</span><br style="font-size:12.8px"><a href="http://goo.gl/it488V" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">http://goo.gl/it488V</a><span style="font-size:12.8px"> for more information.</span><br>
==<br>
<br>Ing. Daniele Romagnoli<br>Senior Software Engineer<br><br>GeoSolutions S.A.S.<br><span style="font-size:12.8px">Via di Montramito 3/A</span><br>55054  Massarosa (LU)<br>Italy<br>phone: +39 0584 962313<br>fax:      +39 0584 1660272<br><br><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a><br><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a><br><br>-------------------------------------------------------<br><p><span lang="IT"><font size="1"><b>AVVERTENZE AI SENSI DEL D.Lgs. 196/2003</b></font></span></p><p><span lang="IT"><font size="1">Le
 informazioni contenute in questo messaggio di posta elettronica e/o 
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il 
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
 per le finalità indicate nel messaggio stesso. Qualora riceviate questo
 messaggio senza esserne il destinatario, Vi preghiamo cortesemente di 
darcene notizia via e-mail e di procedere alla distruzione del messaggio
 stesso, cancellandolo dal Vostro sistema. Conservare il messaggio 
stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, 
copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento
 contrario ai principi dettati dal D.Lgs. 196/2003.</font></span></p><p><span lang="IT"><font size="1"> </font></span></p><p><font size="1">The
 information in this message and/or attachments, is intended solely for 
the attention and use of the named addressee(s) and may be confidential 
or proprietary in nature or covered by the provisions of privacy act 
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection 
Code).Any use not in accord with its purpose, any disclosure, 
reproduction, copying, distribution, or either dissemination, either 
whole or partial, is strictly forbidden except previous formal approval 
of the named addressee(s). If you are not the intended recipient, please
 contact immediately the sender by telephone, fax or e-mail and delete 
the information in this message that has been received in error. The 
sender does not give any warranty or accept liability as the content, 
accuracy or completeness of sent messages and accepts no responsibility 
 for changes made after they were sent or for other risks which arise as
 a result of e-mail transmission, viruses, etc.</font></p><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>