<p dir="ltr">Dennis,</p>
<p dir="ltr">You can create a new raster with the pixel values scaled to one bit so that all you have is zero for no color and one for any color. Use gdal_translate with the -scale option. The exact method depends on the data. Then you are essentially ignoring the color.</p>

<p dir="ltr">Contours are set as lines instead of polygons because they terminate at the raster edges.</p>
<p dir="ltr">--<br>
Best regards,<br>
Chaitanya Kumar CH</p>
<div class="gmail_quote">On Dec 11, 2013 9:48 PM, "Dennis Burgess" <<a href="mailto:dmburgess@linktechs.net">dmburgess@linktechs.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">I have been using the GDAL utilities.  But ran into a snag.  We create KML overlay files, basically KML file that geolocates a PNG on google maps.  This PNG is a vector image as well as can have 1 or two colors other than the transparent background.    We used gdal to convert this to a GEOTIFF using the gdal_contour and this work quite well, its ignores the colors for the most part, as all we want is a poly of the colored areas, don't care about what color.  gedal_polygonize, sees all colors and seams much more rough.  <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">in both cases, we generate a KML shapefile, but it appears they create line entries vs polygons.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
We also use ogr2ogr to simplify the KML as well.   Can anyone give me some better method to get a pologyon for only the colored areas , ignoring changes in color.?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><u><span style="font-size:10.0pt">Dennis Burgess,</span></u></b><b><i><span style="font-size:10.0pt;color:#002060"> </span></i></b><span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p></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>