+ return counter;
+}
+
+
+// load all 2d polygons matching the specified base path and clip
+// against each other to resolve any overlaps
+int load_polys( const string& work_base, FGBucket& b, FGClipper& clipper) {
+ string base = b.gen_base_path();
+ int result;
+
+ // initialize clipper
+ clipper.init();
+
+ // load airports
+ string poly_path = work_base + ".apt" + "/Scenery/" + base;
+ cout << "poly_path = " << poly_path << endl;
+ result = actual_load_polys( poly_path, b, clipper );
+ cout << " loaded " << result << " polys" << endl;
+
+ // load hydro
+ poly_path = work_base + ".hydro" + "/Scenery/" + base;
+ cout << "poly_path = " << poly_path << endl;
+ result = actual_load_polys( poly_path, b, clipper );
+ cout << " loaded " << result << " polys" << endl;
+