[GRASS-user] Snap distance to clean imported map?

Importing a large (4.4G) vector map of wetlands takes a long time even on my
8-core/16-thread, 32G desktop. When it finally completed grass recommended
re-importing with an additional 'snap' distance specified:

Command line: > v.in.ogr in=OR_geodatabase_wetlands.gdb out=more_wetlands loc=geo_wetlands

WARNING: Number of incorrect boundaries: 88544
-----------------------------------------------------
WARNING: The output contains topological errors:
          Unable to calculate a centroid for 329691 areas
          Number of incorrect boundaries: 88544
The input could be cleaned by snapping vertices to each other.
Estimated range of snapping threshold: [1e-09, 1]
Try to import again, snapping with 1e-05: 'snap=1e-05'

In the past 1e-05 produced similar warnings.

I'd like advice on two issues:

1) Is 1e-05 the most reasonable starting snap distance? (I assume it is a
generic value but perhaps not for all maps.) If not, what would be a snap
distance to use?

2) What would be a reasonable snap distance to stop re-importing when
warnings continue to be displayed?

TIA,

Rich

On Thu, Sep 12, 2019 at 2:24 AM Rich Shepard <rshepard@appl-ecosys.com> wrote:

Importing a large (4.4G) vector map of wetlands takes a long time even on my
8-core/16-thread, 32G desktop. When it finally completed grass recommended
re-importing with an additional ‘snap’ distance specified:

Command line: > v.in.ogr in=OR_geodatabase_wetlands.gdb out=more_wetlands loc=geo_wetlands

WARNING: Number of incorrect boundaries: 88544

WARNING: The output contains topological errors:
Unable to calculate a centroid for 329691 areas
Number of incorrect boundaries: 88544
The input could be cleaned by snapping vertices to each other.
Estimated range of snapping threshold: [1e-09, 1]
Try to import again, snapping with 1e-05: ‘snap=1e-05’

In the past 1e-05 produced similar warnings.

I’d like advice on two issues:

  1. Is 1e-05 the most reasonable starting snap distance? (I assume it is a
    generic value but perhaps not for all maps.) If not, what would be a snap
    distance to use?

The estimated snap distance is estimated from the bounding box of the imported data and thus specific for each import. In this particular case the suggested snap distance is snap=1e-5. If results are not as expected, increase or decrease by powers of 10, i.e. up to 1e-4 or down to 1e-6.

  1. What would be a reasonable snap distance to stop re-importing when

warnings continue to be displayed?

The upper limit of the estimated range, in this case of [1e-09, 1], i.e 1.

Markus M

TIA,

Rich


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, 16 Sep 2019, Markus Metz wrote:

The estimated snap distance is estimated from the bounding box of the
imported data and thus specific for each import. In this particular case
the suggested snap distance is snap=1e-5. If results are not as expected,
increase or decrease by powers of 10, i.e. up to 1e-4 or down to 1e-6.

Markus M,

Thanks very much for explaining how snap distances are estimated. Now I can
make better informed decisions.

Regards,

Rich