Apply just the changes from the MLT branch which aren't really part of that work (#3793)

This commit is contained in:
Tim Sylvester
2025-09-11 16:39:58 -07:00
committed by GitHub
parent 921251b973
commit bc025fca49
44 changed files with 181 additions and 123 deletions

View File

@@ -20,7 +20,8 @@ using namespace std::numbers;
namespace mbgl {
static double signedArea(const GeometryCoordinates& ring) {
namespace {
double signedArea(const GeometryCoordinates& ring) {
double sum = 0;
for (std::size_t i = 0, len = ring.size(), j = len - 1; i < len; j = i++) {
@@ -32,7 +33,7 @@ static double signedArea(const GeometryCoordinates& ring) {
return sum;
}
static LinearRing<int32_t> toWagyuPath(const GeometryCoordinates& ring) {
LinearRing<int32_t> toWagyuPath(const GeometryCoordinates& ring) {
MLN_TRACE_FUNC();
LinearRing<int32_t> result;
@@ -43,7 +44,7 @@ static LinearRing<int32_t> toWagyuPath(const GeometryCoordinates& ring) {
return result;
}
static GeometryCollection toGeometryCollection(MultiPolygon<int16_t>&& multipolygon) {
GeometryCollection toGeometryCollection(MultiPolygon<int16_t>&& multipolygon) {
MLN_TRACE_FUNC();
GeometryCollection result;
@@ -54,6 +55,7 @@ static GeometryCollection toGeometryCollection(MultiPolygon<int16_t>&& multipoly
}
return result;
}
} // namespace
GeometryCollection fixupPolygons(const GeometryCollection& rings) {
MLN_TRACE_FUNC();