Skip to content

Conversation

@amishn2008
Copy link
Contributor

Previously, the --simplify_and_densify flag enabled features by default, but passing the flag would actually disable them, which was counterintuitive. This has been fixed by replacing it with a new flag, --disable_simplify_and_densify, which is disabled by default—so simplification and densification are now always enabled unless this flag is explicitly passed.

@adisidev

#291

Prefix flags with disable_
@nihalzp
Copy link
Collaborator

nihalzp commented Aug 4, 2025

Run mapfile -t FILES < <(git ls-files '*.[ch]pp' '*.c' '*.h')
clang-format version: Ubuntu clang-format version 18.1.3 (1ubuntu1)
Running clang-format diff...
--- src/misc/parse_arguments.cpp	2025-07-23 23:41:11.751680671 +0000
+++ /dev/fd/63	2025-07-23 23:42:08.648702283 +0000
@@ -75,7 +75,9 @@
     .implicit_value(false);
   arguments.add_argument("--disable_simplify_and_densify")
     .help(
-      "Boolean: Disable iterative simplification and densification of polygons. By default, simplification and densification are enabled. Pass this flag to disable them.")
+      "Boolean: Disable iterative simplification and densification of "
+      "polygons. By default, simplification and densification are enabled. "
+      "Pass this flag to disable them.")
     .default_value(false)
     .implicit_value(true);
   arguments.add_argument("--skip_projection")
@@ -222,19 +224,23 @@
     std::cerr << "ERROR: simplification disabled!\n";
     std::cerr << "--output_to_stdout flag is only supported with "
                  "simplification or quadtree.\n";
-    std::cerr << "To enable simplification, do not pass the --disable_simplify_and_densify flag.\n";
+    std::cerr << "To enable simplification, do not pass the "
+                 "--disable_simplify_and_densify flag.\n";
     std::cerr << "To enable quadtree, do not pass the -Q flag.\n";
     std::cerr << arguments << std::endl;
     std::exit(18);
   }
 
-  // Check whether n_points is specified but simplification/densification is disabled
+  // Check whether n_points is specified but simplification/densification is
+  // disabled
   if (!args.simplify) {
     std::cerr << "WARNING: Simplification and densification disabled! "
               << "Polygons will not be simplified (or densified). "
               << "This may result in polygon intersections. "
               << "Thus, we are turning off topology checks. "
-              << "To enable simplification, do not pass the --disable_simplify_and_densify flag." << std::endl;
+              << "To enable simplification, do not pass the "
+                 "--disable_simplify_and_densify flag."
+              << std::endl;
     if (arguments.is_used("--n_points")) {
       std::cerr << "--n_points ignored." << std::endl;
     }
❌ src/misc/parse_arguments.cpp
Error: clang-format issues detected in the following files:
src/misc/parse_arguments.cpp
Run 'clang-format -i' to fix.
Error: Process completed with exit code 1.

Some formatting issue in src/misc/parse_arguments.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants