diff --git a/src/Airports/GenAirports/build.cxx b/src/Airports/GenAirports/build.cxx index db669301..2bbef0fb 100644 --- a/src/Airports/GenAirports/build.cxx +++ b/src/Airports/GenAirports/build.cxx @@ -802,6 +802,8 @@ void build_airport( string airport_id, float alt_m, SG_LOG(SG_GENERAL, SG_DEBUG, "total size after remove_dups() = " << poly.total_size()); poly = remove_bad_contours( poly ); SG_LOG(SG_GENERAL, SG_DEBUG, "total size after remove_bad() = " << poly.total_size()); + poly = remove_tiny_contours( poly ); + SG_LOG(SG_GENERAL, SG_DEBUG, "total size after remove_tiny_contours() = " << poly.total_size()); rwy_polys[k].set_poly( poly ); } @@ -818,6 +820,8 @@ void build_airport( string airport_id, float alt_m, base_poly = remove_dups( base_poly ); SG_LOG(SG_GENERAL, SG_DEBUG, "remove bad contours base"); base_poly = remove_bad_contours( base_poly ); + SG_LOG(SG_GENERAL, SG_DEBUG, "remove small contours base"); + base_poly = remove_tiny_contours( base_poly ); // write_polygon( base_poly, "base-fin" ); SG_LOG(SG_GENERAL, SG_DEBUG, " after clean up: " << base_poly); diff --git a/src/Lib/Geometry/poly_support.cxx b/src/Lib/Geometry/poly_support.cxx index f343fe3d..5e56eff5 100644 --- a/src/Lib/Geometry/poly_support.cxx +++ b/src/Lib/Geometry/poly_support.cxx @@ -414,25 +414,28 @@ static void collect_contour_points( TGContourNode* node, TGPolygon &p, point_lis static void write_tree_element( TGContourNode *node, TGPolygon& p, int hole=0) { int contour_num = node->get_contour_num(); - char buf[256]; - sprintf(buf, "failed/element%ld.poly",contour_num); - FILE *treefp = fopen(buf,"w"); - fprintf(treefp,"#2D\n"); - fprintf(treefp,"Airport\n"); - - fprintf(treefp,"1\n"); - - fprintf(treefp,"%ld\n",p.contour_size(contour_num)); - fprintf(treefp,"%d\n",hole); - - for (int i=0;i