]> mj.ucw.cz Git - leo.git/blobdiff - leo.c
Simplify: Splitting of ways to non-branching segments
[leo.git] / leo.c
diff --git a/leo.c b/leo.c
index b30996581f424d104a7775d91494fd0430810209..d7a39bd0f18aea3456ead193fad04b618dd93b6c 100644 (file)
--- a/leo.c
+++ b/leo.c
@@ -4,19 +4,21 @@
  *     (c) 2014 Martin Mares <mj@ucw.cz>
  */
 
-#include <ucw/lib.h>
+#include "leo.h"
+
 #include <ucw/conf.h>
 #include <ucw/opt.h>
 
 #include <stdio.h>
 
-#include "leo.h"
 #include "osm.h"
 #include "svg.h"
 #include "style.h"
 #include "css.h"
 #include "sym.h"
 #include "map.h"
+#include "graph.h"
+#include "simplify.h"
 
 uns debug_dump_source, debug_dump_after_proj, debug_dump_after_scaling;
 uns debug_dump_multipolygons, debug_dump_css, debug_dump_styling, debug_dump_symbols;
@@ -45,6 +47,7 @@ static const struct opt_section options = {
   }
 };
 
+#if 0
 // FIXME: Make generic
 static void draw_scale(struct svg *svg)
 {
@@ -109,6 +112,7 @@ static void draw_scale(struct svg *svg)
   scale_text(svg, width, 5, osm_val_encode("1 km"));
   svg_pop(svg);
 }
+#endif
 
 int main(int argc UNUSED, char **argv)
 {
@@ -120,7 +124,9 @@ int main(int argc UNUSED, char **argv)
   styles_init();
   map_load_styles();
   map_load_sources();
+  graph_build();
   map_set_scale();
+  // map_generalize();
 
   struct svg *svg = svg_open(map_svg_output);
   if (!map_rotate)
@@ -137,6 +143,7 @@ int main(int argc UNUSED, char **argv)
   sym_init();
 
   map_apply_styles(svg);
+  simplify();
 
   if (map_clip)
     {
@@ -181,7 +188,9 @@ int main(int argc UNUSED, char **argv)
   svg_icon_put(svg, &sir);
 #endif
 
+#if 0
   draw_scale(svg);
+#endif
 
   if (map_clip)
     svg_pop(svg);