Opened 9 years ago
Closed 9 years ago
#2964 closed defect (fixed)
G7: v.extract does not remove islands
Reported by: | sbl | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.4 |
Component: | Vector | Version: | 7.0.3 |
Keywords: | v.extract, islands | Cc: | |
CPU: | Unspecified | Platform: | All |
Description
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):
https://lists.osgeo.org/pipermail/grass-user/2014-June/070503.html
https://lists.osgeo.org/pipermail/grass-user/2008-May/044906.html
https://lists.osgeo.org/pipermail/grass-user/2006-May/034301.html
https://lists.osgeo.org/pipermail/grass-dev/2004-May/014602.html
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
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for clarifying and updating the manuals!
Replying to sbl:
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.
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.