From 4752832fe842e1f86b10615f77063d5bc6b82637 Mon Sep 17 00:00:00 2001 From: Martijn Versteegh Date: Wed, 28 Nov 2018 09:57:58 +0100 Subject: [PATCH] Write metadata textfile with tile information, so a separate utility can easily generate a zoom pyramid. --- TileGenerator.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/TileGenerator.cpp b/TileGenerator.cpp index 0da7689..a81025c 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -274,6 +274,18 @@ void TileGenerator::generate(const std::string &input, const std::string &output int trueXMin = m_xMin; int trueZMin = m_zMin; + std::ostringstream mfn; + mfn << "metadata_" << output << ".txt"; + std::ofstream mf; + + mf.open(mfn.str()); + + mf << "BaseName: " << output << std::endl; + mf << "NumTiles: " << m_numTilesX << " " << m_numTilesY << std::endl; + mf << "MinTile: " << minTileX << " " << minTileY << std::endl; + mf << "TileSize: " << (m_tileW*16) << " " << (m_tileH*16) << std::endl; + mf.close(); + for (int x = 0; x < m_numTilesX; x++) { for (int y = 0; y < m_numTilesY; y++)