<div dir="ltr">Is there a simple way to find one or several pixel value none of the bands use ?<div><br></div><div>Mathieu</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-14 12:06 GMT+01:00 Even Rouault-2 [via OSGeo.org] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=5181453&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span>:<br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

        Selon mathieu <<a href="http:///user/SendEmail.jtp?type=node&node=5181443&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>>:
<br><span class=""><br>> The problem is that I don't know want an alpha channel because some of my
<br>> users work on MapInfo and MapInfo doesn't deal with alpha channels..
<br><br></span><span class="">Really ??? Tell them to use QGIS instead. It does support alpha channel.
<br><br>Otherwise try to find a nodata value that isn't a valid pixel value. But I'd
<br>note that the nodata support in TIFF is a GDAL extended TIFF tag, so I wouldn't
<br>be surprised if MapInfo doesn't support it either.
<br></span><div><br>>
<br><span class="">> 2015-01-14 11:39 GMT+01:00 Even Rouault-2 [via OSGeo.org] <
<br></span>> <a href="http:///user/SendEmail.jtp?type=node&node=5181443&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>>:
<br><div><div class="h5">>
<div class='shrinkable-quote'><br>> > Mathieu,
<br>> >
<br>> > If 0 is a valid value at some locations of your raster, then you cannot
<br>> > use it
<br>> > as the nodata value. Use an alpha band instead for example by using
<br>> > -dstalpha
<br>> > instead of -dstnodata 0
<br>> >
<br>> > Even
<br>> >
<br>> > > Hello,
<br>> > >
<br>> > > I crop a 3 band raster by a polygon with the following formula :
<br>> > > /gdalwarp -of GTiff -cutline polygon.shp -cl polygon input.tif
<br>> > output.tif
<br>> > > /
<br>> > > But pixels outside my polygon are assigned the 0 value. I'd like them to
<br>> > > have nodata
<br>> > >
<br>> > > If I put the -dstnodata 0 option :
<br>> > > /gdalwarp -of GTiff -cutline polygon.shp -cl polygon input.tif
<br>> > output.tif
<br>> > > -dstnodata 0/, all the pixels in each of the 3 bands that contain the 0
<br>> > > value will be turned to nodata, even if they are contained in my
<br>> > polygon.
<br>> > >
<br>> > > Hence, 127 0 222 will become 127 nodata 222
<br>> > > or 0 127 222 will become nodata 127 222
<br>> > >
<br>> > > How to put the nodata value only outside my polygon ?
<br>> > >
<br>> > > Thanks a lot in advance !
<br>> > >
<br>> > > Mathieu
<br>> > >
<br>> > >
<br>> > >
<br>> > > --
<br>> > > View this message in context:
<br>> > >
<br>> >
<br>> >
<br>>
</div></div></div><a href="http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426.html" rel="nofollow" link="external" target="_blank">http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426.html</a><div><div><div class="h5"><br>> > > Sent from the GDAL - Dev mailing list archive at Nabble.com.
<br>> > > _______________________________________________
<br>> > > gdal-dev mailing list
</div></div></div>> > > [hidden email] <<a href="http:///user/SendEmail.jtp?type=node&node=5181432&i=0" rel="nofollow" link="external" target="_blank">http:///user/SendEmail.jtp?type=node&node=5181432&i=0</a>>
<br><span class="">> > > <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>> > >
<br>> >
<br>> >
<br>> > --
<br>> > Spatialys - Geospatial professional services
<br>> > <a href="http://www.spatialys.com" rel="nofollow" link="external" target="_blank">http://www.spatialys.com</a><br>> > _______________________________________________
<br>> > gdal-dev mailing list
<br></span>> > [hidden email] <<a href="http:///user/SendEmail.jtp?type=node&node=5181432&i=1" rel="nofollow" link="external" target="_blank">http:///user/SendEmail.jtp?type=node&node=5181432&i=1</a>>
<br>> > <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>> >
<br>> >
<br>> > ------------------------------
<br><span class="">> >  If you reply to this email, your message will be added to the discussion
<br>> > below:
<br>> >
<br>> >
<br>>
</span></div><span class=""><a href="http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426p5181432.html" rel="nofollow" link="external" target="_blank">http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426p5181432.html</a><br>> >  To unsubscribe from Cropping a raster by a polygon - only nodata outside
<br>> > polygon wanted, click here
<br>> >
<br>>
<br><</span><a rel="nofollow" link="external" target="_top">
<br>> > .
<br>> > NAML
<br>> >
<br>>
<br><</a><a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" link="external" target="_blank">http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml</a>>
<br><span class="">> >
<br>>
<br>>
<br>>
<br>>
<br>> --
<br>> View this message in context:
<br>>
<br></span><a href="http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426p5181437.html" rel="nofollow" link="external" target="_blank">http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426p5181437.html</a><span class=""><br>> Sent from the GDAL - Dev mailing list archive at Nabble.com.
<br><br><br></span><span class="">-- 
<br>Spatialys - Geospatial professional services
<br><a href="http://www.spatialys.com" rel="nofollow" link="external" target="_blank">http://www.spatialys.com</a><br>_______________________________________________
<br>gdal-dev mailing list
<br><a href="http:///user/SendEmail.jtp?type=node&node=5181443&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        </span><div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><span class="">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </span><a href="http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426p5181443.html" target="_blank" rel="nofollow" link="external">http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426p5181443.html</a>
        </div><span class="">
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from Cropping a raster by a polygon - only nodata outside polygon wanted, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></span></blockquote></div><br></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Cropping-a-raster-by-a-polygon-only-nodata-outside-polygon-wanted-tp5181426p5181453.html">Re: Cropping a raster by a polygon - only nodata outside polygon wanted</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html">GDAL - Dev mailing list archive</a> at Nabble.com.<br/>