summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-19 19:51:16 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-19 19:51:16 (GMT)
commit4f42b7231fc0ce51d9b0e81c3897dea60e69d562 (patch)
tree2b7da4de4dcd1701d2cecd3ea5670e8cc3e670d3
parentcbf676abb19a10ecf022e123df7b9c05860be98b (diff)
Do not create invalid tile IDs for longitude = +180 degree values
-rw-r--r--tools/vectorosm-tilecreator/TileIterator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/vectorosm-tilecreator/TileIterator.cpp b/tools/vectorosm-tilecreator/TileIterator.cpp
index 1774b3c..de50dfc 100644
--- a/tools/vectorosm-tilecreator/TileIterator.cpp
+++ b/tools/vectorosm-tilecreator/TileIterator.cpp
@@ -50,7 +50,7 @@ TileIterator::TileIterator(const GeoDataLatLonBox &latLonBox, int zoomLevel)
unsigned int N = pow(2, zoomLevel);
m_bounds.setLeft(TileId::lon2tileX(west, N));
m_bounds.setTop(TileId::lat2tileY(north, N));
- m_bounds.setRight(TileId::lon2tileX(east, N));
+ m_bounds.setRight(qMin(N-1, TileId::lon2tileX(east, N)));
m_bounds.setBottom(TileId::lat2tileY(south, N));
}