diff --git a/tile-join.cpp b/tile-join.cpp index 2853433..f597aad 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -52,13 +52,21 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::vector outlayer.extent) { + for (size_t i = 0; i < outlayer.features.size(); i++) { + for (size_t j = 0; j < outlayer.features[i].geometry.size(); j++) { + outlayer.features[i].geometry[j].x = outlayer.features[i].geometry[j].x * layer.extent / outlayer.extent; + outlayer.features[i].geometry[j].y = outlayer.features[i].geometry[j].y * layer.extent / outlayer.extent; + } + } + + outlayer.extent = layer.extent; + } + } + const char *ln = layer.name.c_str(); int ll; @@ -174,6 +182,13 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::vector