Elaboradar  0.1
 Tutto Classi Namespace File Funzioni Variabili Tipi enumerati (enum) Gruppi
template<typename T >
template void elaboradar::Assets::write_gdal_image ( const radarelab::Matrix2D< T > &  image,
const char *  dir_env_var,
const char *  name,
const char *  format 
)

Write a graphic image with gdal.

Parametri
[in]image- Matrix2D to be written
[in]dir_env_var- file path
[in]name- file name
[in]format- file graphic format used.

Definizione alla linea 638 del file assets.cpp.

Referenzia fname_from_acq_time().

Referenziato da elaboradar::SingleCart::write_out().

639 {
640 #ifdef HAVE_GDAL
641  const char* dir = getenv(dir_env_var);
642  if (!dir)
643  {
644  LOG_INFO("$%s not set", dir_env_var);
645  throw runtime_error("required env var is not set");
646  }
647 
648  string fname = string(dir) + "/" + fname_from_acq_time() + "-" + name + "." + gdal_extension_for_format(format);
649 
650  radarelab::write_image(image, fname, format);
651 #else
652  throw std::runtime_error("GDAL support was not enabled at compile time");
653 #endif
654 }
std::string fname_from_acq_time() const
Build a basename (without extension) for a file given the current acquisition time.
Definition: assets.cpp:529