Derives the contour of foreground objects of a raster model and exports the results as a polygon shape file.
The input raster grid cell values are rounded to integer values. After rounding, zero values are regarded as background, non-zero pixels are regarded as foreground regions. This also implies, that nodata
value is not considered, so if areas with no data should not be contoured, then its pixel value should be set to zero. Contiguous foreground pixels are contoured as one polygon. The result of the contouring is the outline of foreground pixels. This outline consists of pixel edge segments instead of segments connecting pixel centers. The holes (background pixels in the foreground object) are handled as inner rings (see OGR definition). Single pixels are not outlined (neither foreground pixels as objects, neither background pixels as holes). Polygons with area less than minArea
are not written in the SHAPE file.
The data used in the following example can be found in the $OPALS_ROOT/demo/
directory. For strip
21
(contained in the demo directory) the following commands are required to obtain DSM model:
As a result, a grid file strip21_z.tif
in GeoTiff format is created. To obtain a binary grid of potential building areas we apply a simple thresholding to get cont_building.tif
serving as input for the subsequent example.
To elimanate single erroneous pixels (salt/pepper noise) we apply morphological operations on the cont_building.tif
grid:
In this example the contouring operation is applied on cont_building_close_open_square_1.tif
dataset. This dataset is a GeoTiff grid:
For the contouring operation a minArea
100
parameter is applied.
The following restrictions apply:
Hollaus, M., W. Wagner, G. Molnar, G. Mandlburger, C. Nothegger, J. Otepka (2010) Deliniation of vegetation and building polygons from full-waveform airborne lidar data using OPALS software, Geospatial Data and Geovisualization: Environment, Security, and Society, Special Joint Symposium of ISPRS Technical Commission IV and AutoCarto 2010 in conjunction with ASPRS/GaGIS Speciality Conference, 15999 November 2010, Orlando, Florida, USA, CDROM, 7 p.