<div dir="ltr"><br><br>On Tue, May 14, 2019 at 12:26 AM Tyler Smith <<a href="mailto:tyler@plantarum.ca">tyler@plantarum.ca</a>> wrote:<br>><br>> Hello,<br>><br>> I am trying to import a shapefile that contains polygons. Using v.in.ogr with default settings works, but generates overlapping areas:<br>><br>> ```<br>> v.in.ogr input=~/path/to/data/ output=soils_omafra<br>><br>> ...<br>><br>> -----------------------------------------------------<br>> 139375 input polygons<br>> Total area: 1.87116E+11 (713211 areas)<br>> Overlapping area: 465.913 (142064 areas)<br>> Area without category: 1.0631E+09 (137984 areas)<br>> -----------------------------------------------------<br>> Copying features...<br>><br>> Building topology for vector map <soils_omafra@PERMANENT>...<br>> Registering primitives...<br>> Building areas...<br>> WARNING: Area of size = 0.0 ignored<br>> WARNING: Area of size = 0.0 ignored<br>> WARNING: Area of size = 0.0 ignored<br>> ```<br>><br>> After several hours testing different values of snap and min_area, I have come up with the following:<br>><br>> ```<br>> v.in.ogr input=~/path/to/data/ output=soils_omafra snap=4.52e-07 min_area=10.0<br>><br>> ...<br>><br>> -----------------------------------------------------<br>> 138109 input polygons<br>> Total area: 1.87116E+11 (138565 areas)<br>> Overlapping area: 34.3593 (4 areas)<br>> Area without category: 1.0631E+09 (421 areas)<br>> -----------------------------------------------------<br>><br>> [no warnings reported]<br>> ```<br>><br>> If I increase snap any more I start creating additional areas, so I don't think I can automatically get rid of the remaining 4 areas.<br>><br>> However, when I plot those areas and look at them, they are below the min_area threshold I've set:<br>><br>> ```<br>> d.what.vect map=soils_omafra<br>><br>> ...<br>> soils_omafra@PERMANENT:<br>> Type: Area<br>> Sq_Meters: 6.307<br>> Hectares: 0.001<br>> Acres: 0.002<br>> Sq_Miles: 0.0<br>> Layer: 2<br>> Category: 2<br>> ...<br>> ```<br>><br><div>> My map is in a lat-long projection, and the map unit is meters. I thought setting min_area=10.0 would drop all areas smaller than 10 sq meters, but my problem areas here are only 6.3 sq meters?</div><div><br></div><div>Maybe the documentation needs some clarification: the min_area applies to input polygons, not to output areas, i.e. input polygons smaller than min_area are dropped. If you want to get rid off output areas smaller than min_area=10, you need to use v.clean tool=rmarea threshold=10.<br></div>><br>> Have I misunderstood what min_area does, or am I setting it incorrectly? I notice that the default is 0.0001, which seems really small if the units is actually meters.<br><div><br></div><div>The purpose of min_area is to filter out noise in the input.<br></div><div>></div>> More generally, I'm not sure how critical these overlapping areas are, or when I can safely ignore them. For my current project, I'm going to use the imported polygons to create rasters for analysis in R.<br><div><br></div><div>There is no general answer if these overlapping areas are critical or not, it depends mostly on whether overlapping areas are allowed at all.</div><div><br></div><div>Markus M<br></div><div>></div>> Thank you for your time,<br>><br>> Tyler<br>><br>> --<br>> <a href="http://plantarum.ca">plantarum.ca</a><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></div>