Mercurial > gemma
comparison pkg/imports/sr.go @ 3733:ec86a7155377 concave-hull
Estimated too large triangles as triangles which have an edge which is at least 3.5 times as long as the standard dev of the longest egde per inner triangle.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 24 Jun 2019 11:39:09 +0200 |
parents | 58508f50d192 |
children | 879c297c47e9 |
comparison
equal
deleted
inserted
replaced
3729:9fa108794e21 | 3733:ec86a7155377 |
---|---|
66 contourStepWidth = 0.1 | 66 contourStepWidth = 0.1 |
67 contourTolerance = 0.1 | 67 contourTolerance = 0.1 |
68 ) | 68 ) |
69 | 69 |
70 const ( | 70 const ( |
71 tooLongEdge = 50.0 | |
72 pointsPerSquareMeter = 2 | 71 pointsPerSquareMeter = 2 |
73 ) | 72 ) |
74 | 73 |
75 // SRJobKind is the unique name of a SoundingResult import job. | 74 // SRJobKind is the unique name of a SoundingResult import job. |
76 const SRJobKind JobKind = "sr" | 75 const SRJobKind JobKind = "sr" |
396 clippingPolygonWKB []byte | 395 clippingPolygonWKB []byte |
397 ) | 396 ) |
398 | 397 |
399 if boundary == nil { | 398 if boundary == nil { |
400 feedback.Info("No boundary given. Calulate from XYZ data.") | 399 feedback.Info("No boundary given. Calulate from XYZ data.") |
400 tooLongEdge := tri.EstimateTooLong() | |
401 feedback.Info("Eliminate triangles with edges longer than %.2f meters.", tooLongEdge) | 401 feedback.Info("Eliminate triangles with edges longer than %.2f meters.", tooLongEdge) |
402 | 402 |
403 var polygon octree.LineStringZ | 403 var polygon octree.LineStringZ |
404 start = time.Now() | 404 start = time.Now() |
405 polygon, removed = tri.ConcaveHull(tooLongEdge) | 405 polygon, removed = tri.ConcaveHull(tooLongEdge) |