Skip to content

Commit

Permalink
Write metadata textfile with tile information, so a separate utility …
Browse files Browse the repository at this point in the history
…can easily generate a zoom pyramid.
  • Loading branch information
Martijn Versteegh committed Nov 28, 2018
1 parent aa05062 commit bcf554b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions TileGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 << "MinTiles: " << 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++)
Expand Down

0 comments on commit bcf554b

Please sign in to comment.