![]() |
![]()
| ![]() |
![]()
NAMEv.fill.holes - Fill holes in areas by keeping only outer boundaries KEYWORDSvector, geometry, fill, exterior, ring, perimeter SYNOPSISv.fill.holes
Flags:
Parameters:
DESCRIPTIONv.fill.holes fills empty spaces inside areas, specifically
it preserves areas with centroids while areas without centroids, which
typically represent holes, are removed. v.fill.holes goes over all
areas in a vector map and it preserves only outer boundaries of each area
while removing inner boundaries which are considered holes. The holes become
part of the area which contained them. No boundaries of these holes are
preserved.
TopologyStrictly speaking, in the GRASS topological model, an area is a closed boundary (or a series of connected closed boundaries) which may have a centroid. If it has a centroid, it is rendered as a filled area in displays and this is what is usually considered an area from the user perspective. These are the areas where v.fill.holes preserves the associated outer boundary (or boundaries). Other closed boundaries, i.e., those without a centroid, are not carried over to the output. All other features are removed including points and lines. AttributesIf a specific layer is selected, attributes for that layer are preserved for the areas based on the category or categories associated with each area. By default, layer number 1 is selected. In case there are attribute tables associated with other layers or attributes associated with categories of other features than areas with centroids, this attribute data is not carried over to the output just like the corresponding geometries. EXAMPLEThe lakes vector map in the North Carolina sample dataset
represents islands inside lakes as areas distinguished by attributes. To
demonstrate v.fill.holes, we will first extract only the lakes which
will create holes where the islands were located. Then, we will fill the
holes created in the lakes to get the whole perimeter of the lakes including
islands. Remove the islands by extracting everything else (results in
holes):
v.extract input=lakes where="FTYPE != ’ROCK/ISLAND’" output=lakes_only Remove the holes:
v.fill.holes input=lakes_only output=lakes_filled Figure: The filled lake (blue) and borders of the original lakes with islands removed (light blue). Figure shows a smaller area in the north of the data extent. SEE ALSO
AUTHORVaclav Petras, NCSU Center for Geospatial Analytics, GeoForAll Lab SOURCE CODEAvailable at: v.fill.holes source code (history) Latest change: Tuesday Apr 23 10:45:15 2024 in commit: f8115df1219e784a7136e7609f4c9bb16d928e2f Main index | Vector index | Topics index | Keywords index | Graphical index | Full index © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
|