Skip to content

Fix terrain_reduced_colors.png generation#2

Draft
lucunix wants to merge 2 commits intoDerMattinger:masterfrom
lucunix:master
Draft

Fix terrain_reduced_colors.png generation#2
lucunix wants to merge 2 commits intoDerMattinger:masterfrom
lucunix:master

Conversation

@lucunix
Copy link

@lucunix lucunix commented Feb 8, 2026

ImageMagickBatchExport generates batch scripts that write to image_exports\[tile_name]\ but never creates this subdirectory, causing file creation to fail.

Changes

  • Added mkdir commands to generated batch file in ImageMagickBatchExport function before file operations
ScriptBatchFile.WriteLine($"if not exist ""%PathToScriptsFolder%\image_exports"" mkdir ""%PathToScriptsFolder%\image_exports""")
ScriptBatchFile.WriteLine($"if not exist ""%PathToScriptsFolder%\image_exports\%Tile%"" mkdir ""%PathToScriptsFolder%\image_exports\%Tile%""")

Ensures directory structure exists before ImageMagick operations attempt to write *_terrain_reduced_colors.png and related files.

Create image_exports root and per-tile subfolders (including heightmap) and ensure CreateFilesAndFolders is called from QgisGeneration and ImageMagickGeneration. Add CalcScale and WriteLog helper functions and remove duplicated code; fix a minor error message punctuation. Update solution metadata (bump Visual Studio version, add project dependency) and add a slnLaunch.user. Numerous build outputs, generated files and .vs/Copilot index files were updated as part of the rebuild.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments