diff pkg/imports/sr.go @ 5706:148abae1fcd0 sr-v2

Quantize xyz in points in X/Y to 1/QuantScale.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 20 Feb 2024 12:52:09 +0100
parents 03dfbe675842
children 6270951dda28
line wrap: on
line diff
--- a/pkg/imports/sr.go	Tue Feb 20 09:51:20 2024 +0100
+++ b/pkg/imports/sr.go	Tue Feb 20 12:52:09 2024 +0100
@@ -512,9 +512,14 @@
 	if err := xyz.FromWKB(reproj); err != nil {
 		return nil, err
 	}
-
 	feedback.Info("Reprojecting points to EPSG %d took %v.",
 		epsg, time.Since(start))
+
+	start = time.Now()
+	xyz = xyz.QuantizeXY(mesh.QuantScale)
+	feedback.Info("Quantizing points in X/Y to 1/%d took %v.",
+		mesh.QuantScale, time.Since(start))
+
 	feedback.Info("Number of reprojected points: %d", len(xyz))
 	feedback.Info("Triangulate XYZ data.")