trying to Patch a DEM
(trying to) Patch a DEM#
I embarked yesterday on a quest to fix areas of a DEM which are supposed
to be flat from a raster generated from lake polygons with elevations,
and not have abrubt transition from the flat lakes to the original DEM
(profile like a J not an L). Sample data at
here
(10mb)
There is a post in the ESRI support forum which I think is describing what I want, in a syntax for arcinfo. Since it looks like I'll have to do some scripting no matter what, I might as well figure out how to do so in open source tools rather than be confined to the walled garden of ArcGIS. I thought 'twas going to be easy, but it appears not, thus this post. Or maybe I just haven't stumbled on the right search keywords yet. Asking on gdal-dev mailing list led me to Ossim irc, in turn to Grass irc, and now to parts all over.
More thoughts and snippets posted as I learn, or don't, my way through this swamp.
Leads so far:
Gdal/ogr doesn't have any way of doing feathering along edges or cutlines with gdalwarp and friends.
Ossim's imagelinker has a feather-mosaic tool, but the options are not exposed to the user. It's designed for mosaicking adjacent images which overlap only somewhat, not completely as is the case here.
Grass has a mapcalc tool which in theory could be adapted to the arcinfo method outlined earlier.
Saga GIS has a patch module which looks like it might be applicable. I've not found any documentation for the module yet which has enough detail to explain it.
Mirone has a number of intriguing things like grdfilter which "will filter a grid using boxcar… gaussian… filter and computing distances using cartesian or spherical geometries…." and much other stuff which I don't understand. Looks like the right neighborhood though.
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. — Joaqim Luis
date: 2009-10-17
tags: [projects]
category: Projects