Skip to content

Commit

Permalink
Bugfix: respect flipped Y axis for tile indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nakaner committed Nov 9, 2023
1 parent 1faaa00 commit e024acc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mbtiles_vector_featureset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ mbtiles_vector_featureset::mbtiles_vector_featureset(std::shared_ptr<sqlite_conn
constexpr double width = 2.0 * 6378137 * M_PI;
xmin_ = static_cast<int>((extent_.minx() + width / 2) * (tile_count / width));
xmax_ = static_cast<int>((extent_.maxx() + width / 2) * (tile_count / width));
ymin_ = static_cast<int>(((width / 2) - extent_.miny()) * (tile_count / width));
ymax_ = static_cast<int>(((width / 2) - extent_.maxy()) * (tile_count / width));
ymin_ = static_cast<int>(((width / 2) - extent_.maxy()) * (tile_count / width));
ymax_ = static_cast<int>(((width / 2) - extent_.miny()) * (tile_count / width));
x_ = xmin_;
y_ = ymin_;
open_tile();
Expand Down

0 comments on commit e024acc

Please sign in to comment.