Skip to content

Commit a912577

Browse files
committed
optimize scaled polygon.
1 parent fc41d6c commit a912577

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/world_builder/parameters.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,9 +796,9 @@ namespace WorldBuilder
796796
layer_type = LayerType::ICE_TOP;
797797
}
798798
WBAssertThrow(layer_type != LayerType::MAX_LAYERTYPE, "Could not find litho1.0 layer type " << rest_of_string);
799+
const std::vector<Point<2>> scaled_polygon = Utilities::get_scaled_polygon(addition_points,1.5);
799800
for (size_t index = 0; index < n_nodes; ++index )
800801
{
801-
const std::vector<Point<2>> scaled_polygon = Utilities::get_scaled_polygon(addition_points,1.5);
802802
// only add the point if it is actually in the feature
803803
if (Utilities::polygon_contains_point(scaled_polygon, Point<2>(Datasets::LITHO1_0::coordinates_lat_long[index*2+1],Datasets::LITHO1_0::coordinates_lat_long[index*2],CoordinateSystem::spherical)))
804804
{

0 commit comments

Comments
 (0)