[gdal-dev] advice on feathering rasters together?
Joaquim Luis
jluis at ualg.pt
Wed Feb 20 17:39:08 EST 2008
Matt Wilkie wrote:
> Not solutions yet, but a couple of promising trails. Summary of where
> I'm at here: http://www.uttara.ca/blog/gis/trying-to-patch-a-dem
Matt,
I'm not familiar with the "feathering" term but if what you want is to
have your DEM flat at the lakes position than both of your "dem.tif" and
"lakes.tif" files should have exactly the same number of rows/columns.
Which they have not.
I don't know a gdal solution but it Matlab (vectorial coding) it would
be something very close to this two lines.
# let 'lakes' and 'dem' be variables with the contents of their
corresponding files
mask_lakes = (lakes > 0); % a binary logical array
dem(mask_lakes) = lakes(mask_lakes);
P.S. Those Mirone "intriguing things like grdfilter which ... I don’t
understand" are very well described in the GMT manual. Its so because
they are MEX ports (a Matlab term to designate wraps to compiled C or
fortran code that runs under ML) of corresponding GMT modules.
Joaquim Luis
More information about the gdal-dev
mailing list