9 const std::optional<std::string>& output_dir)
noexcept
13 return std::filesystem::path(*output_dir);
16 std::filesystem::path default_out_dir = std::filesystem::path(script_file).parent_path();
17 if (default_out_dir.empty())
19 default_out_dir =
".";
22 return default_out_dir;
26 const std::filesystem::path& final_output_dir,
27 const std::optional<std::string>& kml_file)
noexcept
29 if (kml_file && !kml_file->empty())
31 const std::filesystem::path provided_kml_path(*kml_file);
32 if (provided_kml_path.has_parent_path() || provided_kml_path.is_absolute())
34 return provided_kml_path;
37 return final_output_dir / provided_kml_path;
40 std::filesystem::path kml_output_path = final_output_dir / std::filesystem::path(script_file).filename();
41 kml_output_path.replace_extension(
".kml");
42 return kml_output_path;