|
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
|
|
struct GModule *module;
|
|
struct GModule *module;
|
|
struct
|
|
struct
|
|
{
|
|
{
|
|
- struct Option *input, *output, *target, *title, *outloc, *band;
|
|
|
|
|
|
+ struct Option *input, *output, *target, *title, *outloc, *band, *memory;
|
|
} parm;
|
|
} parm;
|
|
struct Flag *flag_o, *flag_e, *flag_k, *flag_f, *flag_l, *flag_c;
|
|
struct Flag *flag_o, *flag_e, *flag_k, *flag_f, *flag_l, *flag_c;
|
|
|
|
|
|
@@ -101,6 +101,12 @@ int main(int argc, char *argv[])
|
|
parm.band->required = NO;
|
|
parm.band->required = NO;
|
|
parm.band->description = _("Band to select (default is all bands)");
|
|
parm.band->description = _("Band to select (default is all bands)");
|
|
|
|
|
|
|
|
+ parm.memory = G_define_option();
|
|
|
|
+ parm.memory->key = "memory";
|
|
|
|
+ parm.memory->type = TYPE_INTEGER;
|
|
|
|
+ parm.memory->required = NO;
|
|
|
|
+ parm.memory->description = _("Cache size (MiB)");
|
|
|
|
+
|
|
parm.target = G_define_option();
|
|
parm.target = G_define_option();
|
|
parm.target->key = "target";
|
|
parm.target->key = "target";
|
|
parm.target->type = TYPE_STRING;
|
|
parm.target->type = TYPE_STRING;
|
|
@@ -185,6 +191,8 @@ int main(int argc, char *argv[])
|
|
/* Fire up the engines. */
|
|
/* Fire up the engines. */
|
|
/* -------------------------------------------------------------------- */
|
|
/* -------------------------------------------------------------------- */
|
|
GDALAllRegister();
|
|
GDALAllRegister();
|
|
|
|
+ if (parm.memory->answer && *parm.memory->answer)
|
|
|
|
+ GDALSetCacheMax(atol(parm.memory->answer) * 1024 * 1024);
|
|
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/* -------------------------------------------------------------------- */
|