I finally got gdal_polygonize.py 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.
My understanding is this function merge contiguous cells with the same 
pixel value.

Can I use this function and specify a range of value?
Example: merge contiguous cells having a value > 16 and < 19

thanks
Steve


Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
[email protected]
http://www.inspq.qc.ca
 




Frank Warmerdam <[email protected]>@lists.osgeo.org 
Envoyé par : [email protected]
17/07/2009 01:24 PM

A
[email protected]
cc
[email protected]
Objet
Re: [gdal-dev] RE clip intersected








[email protected] wrote:
> 
> I might try this..is it the good way to do what I need?
> 
> 1- Use gdal_polygonize.py to create a boundary (excluding pixels with no 

> value) of each image and save the boundary as a .shp
> 2- Somehow find the intersected region of the 2 polygons (boundaries) 
> created above and save the result to .shp
> 3- Use gdal_rasterize on one of the original image  to burn a nodata 
> value based on the polygon representing the intersection area
> 
> I didn't try yet because I don't have gdal_polygonize.py
> My installation is from MS4W and this script is not there. I just 
> install GDAL with OSGEO4w and it seems that this script doesn't exist.
> 
> If the method above is valid,
> - how can I create a boundary excluding pixels with nodata?
> - And, of course, where can I get  gdal_polygonize.py

Steve,

I would be tempted to do this process in raster space.  Perhaps by warping
both images into different bands of a mosaic file to get everything 
overlaying
and then using some sort of raster modelling (perhaps via numpy in a 
python
script) to zero out the one image where the other is set.

I think the vector mask approach would be difficult, in part because the 
mask
produced would be very fine grained.  Depending on your need for precision 
you
could just hand digitize a vector mask suitable to wipe out the 
overlapping
area.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, 
[email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev



_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to