[gdal-dev] gdal utilities question

2013-12-11 Thread Dennis Burgess
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.  

 

in both cases, we generate a KML shapefile, but it appears they create
line entries vs polygons.

 

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.?

 

Dennis Burgess, 

 

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal utilities question

2013-12-11 Thread Chaitanya kumar CH
Dennis,

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.

Contours are set as lines instead of polygons because they terminate at the
raster edges.

--
Best regards,
Chaitanya Kumar CH
On Dec 11, 2013 9:48 PM, Dennis Burgess dmburg...@linktechs.net wrote:

 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.



 in both cases, we generate a KML shapefile, but it appears they create
 line entries vs polygons.



 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.?



 *Dennis Burgess,*



 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev