<br><font size=2 face="sans-serif">I finally got </font><tt><font size=2>gdal_polygonize.py</font></tt><font size=2 face="sans-serif">
and tried it and generate a shapefile. I might not use it as a solution
for what I described below but I would like to use it for other purpose.</font>
<br><font size=2 face="sans-serif">My understanding is this function merge
contiguous cells with the same pixel value.</font>
<br>
<br><font size=2 face="sans-serif">Can I use this function and specify
a range of value?</font>
<br><font size=2 face="sans-serif">Example: merge contiguous cells having
a value > 16 and < 19</font>
<br>
<br><font size=2 face="sans-serif">thanks</font>
<br><font size=2 face="sans-serif">Steve</font>
<br>
<br><font size=2 face="sans-serif"><br>
</font><font size=3 color=#0066ff><i>Steve Toutant, M. Sc.</i></font><font size=3><br>
Analyste en géomatique<br>
Secteur environnement<br>
Direction des risques biologiques, environnementaux et occupationnels<br>
Institut national de santé publique du Québec<br>
945, avenue Wolfe<br>
Québec, Qc G1V 5B3 </font>
<p><font size=3>Tél.: (418) 650-5115 #5281<br>
Fax.: (418) 654-3144</font><font size=3 color=blue><u><br>
</u></font><a href=mailto:steve.toutant@inspq.qc.ca><font size=3 color=blue><u>steve.toutant@inspq.qc.ca</u></font></a><font size=3 color=blue><u><br>
</u></font><a href=http://www.inspq.qc.ca/><font size=3 color=blue><u>http://www.inspq.qc.ca</u></font></a>
<p><font size=3> </font>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Frank Warmerdam <warmerdam@pobox.com>@lists.osgeo.org</b>
</font>
<br><font size=1 face="sans-serif">Envoyé par : gdal-dev-bounces@lists.osgeo.org</font>
<p><font size=1 face="sans-serif">17/07/2009 01:24 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">Steve.Toutant@inspq.qc.ca</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">gdal-dev@lists.osgeo.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: [gdal-dev] RE clip intersected</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Steve.Toutant@inspq.qc.ca wrote:<br>
> <br>
> I might try this..is it the good way to do what I need?<br>
> <br>
> 1- Use gdal_polygonize.py to create a boundary (excluding pixels with
no <br>
> value) of each image and save the boundary as a .shp<br>
> 2- Somehow find the intersected region of the 2 polygons (boundaries)
<br>
> created above and save the result to .shp<br>
> 3- Use gdal_rasterize on one of the original image to burn a
nodata <br>
> value based on the polygon representing the intersection area<br>
> <br>
> I didn't try yet because I don't have gdal_polygonize.py<br>
> My installation is from MS4W and this script is not there. I just
<br>
> install GDAL with OSGEO4w and it seems that this script doesn't exist.<br>
> <br>
> If the method above is valid,<br>
> - how can I create a boundary excluding pixels with nodata?<br>
> - And, of course, where can I get gdal_polygonize.py<br>
<br>
Steve,<br>
<br>
I would be tempted to do this process in raster space. Perhaps by
warping<br>
both images into different bands of a mosaic file to get everything overlaying<br>
and then using some sort of raster modelling (perhaps via numpy in a python<br>
script) to zero out the one image where the other is set.<br>
<br>
I think the vector mask approach would be difficult, in part because the
mask<br>
produced would be very fine grained. Depending on your need for precision
you<br>
could just hand digitize a vector mask suitable to wipe out the overlapping<br>
area.<br>
<br>
Best regards,<br>
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com<br>
light and sound - activate the windows | http://pobox.com/~warmerdam<br>
and watch the world go round - Rush | Geospatial Programmer
for Rent<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
gdal-dev@lists.osgeo.org<br>
http://lists.osgeo.org/mailman/listinfo/gdal-dev<br>
</font></tt>
<br>
<br>
<br>