1
0
Fork 0

Various changes to match changes in supporting Lib API(s).

This commit is contained in:
curt 2004-05-17 20:43:31 +00:00
parent 7de22d8ef2
commit 08f9a12765
9 changed files with 24 additions and 23 deletions

View file

@ -1326,8 +1326,8 @@ void build_airport( string airport_id, float alt_m,
string holepath = root + "/AirportArea";
// long int poly_index = poly_index_next();
// write_boundary( holepath, b, hull, poly_index );
tgChopPolygon( holepath, HoleArea, divided_base, true );
tgChopPolygon( holepath, AirportArea, apt_clearing, false );
tgChopNormalPolygon( holepath, HoleArea, divided_base, true );
tgChopNormalPolygon( holepath, AirportArea, apt_clearing, false );
}

View file

@ -148,7 +148,8 @@ int main( int argc, char **argv ) {
} else if ( arg.find("--max-lat=") == 0 ) {
max_lat = atof( arg.substr(10).c_str() );
} else if ( arg.find("--chunk=") == 0 ) {
tg::Rectangle rectangle = tg::parseChunk(arg.substr(8).c_str());
tg::Rectangle rectangle = tg::parseChunk(arg.substr(8).c_str(),
10.0);
min_lon = rectangle.getMin().x();
min_lat = rectangle.getMin().y();
max_lon = rectangle.getMax().x();

View file

@ -179,7 +179,7 @@ processPoints (const E00 &data, const tg::Rectangle &bounds,
}
tg::makePolygon(p, width, shape);
tgChopPolygon(workDir, areaType, shape, false);
tgChopNormalPolygon(workDir, areaType, shape, false);
}
}
@ -242,7 +242,7 @@ processLines (const E00 &data, const tg::Rectangle &bounds,
cout << " Minimum angle: "
<< (shape.minangle_contour(0) * SGD_RADIANS_TO_DEGREES) << endl;
tgChopPolygon(workDir, areaType, shape, false);
tgChopNormalPolygon(workDir, areaType, shape, false);
}
cout << "Done lines" << endl;
}
@ -309,7 +309,7 @@ processPolygons (const E00 &data, const tg::Rectangle &bounds,
0.0));
}
}
tgChopPolygon(workDir, areaType, shape, false);
tgChopNormalPolygon(workDir, areaType, shape, false);
}
}

View file

@ -86,13 +86,13 @@ void split_and_shift_chunk( const string& path, AreaType area,
upper_shape.shift( -360, 0 );
SG_LOG ( SG_GENERAL, SG_INFO, "Processing lower shape" );
tgChopPolygon(path, area, lower_shape, false);
tgChopBigSimplePolygon(path, area, lower_shape, false);
SG_LOG ( SG_GENERAL, SG_INFO, "Processing center shape" );
tgChopPolygon(path, area, center_shape, false);
tgChopBigSimplePolygon(path, area, center_shape, false);
SG_LOG ( SG_GENERAL, SG_INFO, "Processing upper shape" );
tgChopPolygon(path, area, upper_shape, false);
tgChopBigSimplePolygon(path, area, upper_shape, false);
}

View file

@ -329,7 +329,7 @@ int main( int argc, char **argv ) {
poly_index_init( counter_file );
string holepath = root + "/PhotoArea";
tgChopPolygon( holepath, HoleArea, hole, false );
tgChopNormalPolygon( holepath, HoleArea, hole, false );
return 0;
}

View file

@ -417,7 +417,7 @@ int main( int argc, char **argv ) {
// holes are preserved
area = get_area_type( force_area_type );
tgChopPolygon(work_dir, area, shape, false);
tgChopNormalPolygon(work_dir, area, shape, false);
} else if ( area == OceanArea ) {
// interior of polygon is ocean, holes are islands
@ -451,7 +451,7 @@ int main( int argc, char **argv ) {
// tgChopPolygon(work_dir, area, shape, false);
} else {
tgChopPolygon(work_dir, area, shape, false);
tgChopNormalPolygon(work_dir, area, shape, false);
}
}

View file

@ -299,7 +299,7 @@ int main( int argc, char **argv ) {
// holes are preserved
area = get_area_type( force_area_type );
tgChopPolygon(work_dir, area, shape, false);
tgChopNormalPolygon(work_dir, area, shape, false);
} else if ( area == OceanArea ) {
// interior of polygon is ocean, holes are islands
@ -333,7 +333,7 @@ int main( int argc, char **argv ) {
// tgChopPolygon(work_dir, area, shape, false);
} else {
tgChopPolygon(work_dir, area, shape, false);
tgChopNormalPolygon(work_dir, area, shape, false);
}
}

View file

@ -219,8 +219,8 @@ usage ()
<< " [opts] <db> <library> <coverage> <feature>"
<< endl;
cerr << "Options:" << endl;
cerr << "--tile=<tile> (default: none)" << endl;
cerr << "--chunk=<chunk> (default: none)" << endl;
cerr << "--tile=<tile> (default: none, ex: e002n49)" << endl;
cerr << "--chunk=<chunk> (default: none, ex: w090n10)" << endl;
cerr << "--min-lon=<longitude> (default: -180.0)" << endl;
cerr << "--min-lat=<latitude> (default: -90.0)" << endl;
cerr << "--max-lon=<longitude> (default: 180.0)" << endl;
@ -305,7 +305,7 @@ main (int argc, const char **argv)
}
else if (arg.find("--chunk=") == 0) {
bounds = tg::parseChunk(arg.substr(8));
bounds = tg::parseChunk(arg.substr(8), 10.0);
argPos++;
}
@ -549,7 +549,7 @@ main (int argc, const char **argv)
if ( max_segment > 1.0 ) {
shape = tgPolygonSplitLongEdges( shape, max_segment );
}
tgChopPolygon(work_dir, material_type, shape, false);
tgChopNormalPolygon(work_dir, material_type, shape, false);
}
}
}
@ -565,7 +565,7 @@ main (int argc, const char **argv)
if ( max_segment > 1.0 ) {
mask = tgPolygonSplitLongEdges( mask, max_segment );
}
tgChopPolygon(work_dir, material_type, mask, false);
tgChopNormalPolygon(work_dir, material_type, mask, false);
} else {
cout << "Inverse polygon is empty" << endl;
}

View file

@ -65,7 +65,7 @@ add_point (SGPropertyNode_ptr node)
TGPolygon poly;
tg::makePolygon(p, node->getIntValue("width", 500), poly);
poly = tgPolygonInt(poly, bounds_poly);
tgChopPolygon(".", material, poly, false);
tgChopNormalPolygon(".", material, poly, false);
}
static void
@ -86,7 +86,7 @@ add_line (SGPropertyNode_ptr node)
TGPolygon poly;
tg::makePolygon(line, node->getIntValue("width", 10), poly);
poly = tgPolygonInt(poly, bounds_poly);
tgChopPolygon(".", material, poly, false);
tgChopNormalPolygon(".", material, poly, false);
}
static void
@ -108,7 +108,7 @@ add_polygon (SGPropertyNode_ptr node)
poly.set_hole_flag(i, contour_node->getBoolValue("hole", false));
}
poly = tgPolygonInt(poly, bounds_poly);
tgChopPolygon(".", material, poly, false);
tgChopNormalPolygon(".", material, poly, false);
}
void
@ -135,7 +135,7 @@ main (int ac, char ** av)
string arg = av[argPos];
if (arg.find("--chunk=") == 0) {
bounds = tg::parseChunk(arg.substr(8));
bounds = tg::parseChunk(arg.substr(8), 10.0);
argPos++;
}