#2964: G7: v.extract does not remove islands
-------------------------------+-------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Vector | Version: 7.0.3
Keywords: v.extract,islands | CPU: Unspecified
Platform: All |
-------------------------------+-------------------------
v.extract in GRASS 7.0.3 (and trunk too I guess) does not remove islands
from areas.
This problem has been reported on the mailinglist earlier (for earlier
versions): [[BR]]
A test using the North Carolina data set illustrates it. Both the
following v.extract commands are - according to the manual - supposed to
remove islands. However, islands are still present in the results:
{{{
# Create a vector map with islands
v.extract input=soils_general@PERMANENT cats=222 output=map_with_islands
# From the Manual
v.extract input=map_with_islands output=maps_without_islands cats=1-99999
# and/or
v.extract -d in=map_with_islands out=maps_without_islands
}}}
#2964: G7: v.extract does not remove islands
--------------------------+-------------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Vector | Version: 7.0.3
Resolution: | Keywords: v.extract,islands
CPU: Unspecified | Platform: All
--------------------------+-------------------------------
Comment (by mmetz):
Replying to [ticket:2964 sbl]:
> v.extract in GRASS 7.0.3 (and trunk too I guess) does not remove islands
from areas.
This is correct behaviour of v.extract. In GRASS, an area is composed of
boundaries of the outer ring and boundaries of the enclosed islands, and a
centroid. If you extract a given area with v.extract, you get its
boundaries of the outer ring, boundaries of any enclosed islands, and its
centroid. This is identical to non-topological vectors like shapefiles: a
polygon is defined by its outer ring and any inner rings (islands).
Extracting a single polygon will preserve the inner rings but not the
polygons inside the inner rings.
>
> {{{
> # From the Manual
> v.extract input=map_with_islands output=maps_without_islands
cats=1-99999
> # and/or
> v.extract -d in=map_with_islands out=maps_without_islands
> }}}
The manual is misleading because it does not specify the type to be
extracted (should be area) and because it does not specify the layer to be
extracted (presumably 1). The manual is wrong because the given commands
do not remove islands. They are not supposed to remove islands, or inner
rings in Simple Feature Specification.
Manuals of relbr70 and trunk have been updated in r68070,1.