moja-global / FLINT.Example

A FLINT template to help start building a project based on the FLINT framework
Mozilla Public License 2.0
2 stars 29 forks source link

Failure with missing file DMA_AL4.json #18

Closed floybix closed 4 years ago

floybix commented 4 years ago

Describe the bug Running the Chapman-Richards spatial example, the run fails and reports a FileNotFoundException (see below for full output).

To Reproduce Steps to reproduce the behavior:

Expected behavior Something like Started ... onOutputStep ... Finished.

Observed behavior

C:\Users\Felix\Dev\FLINT.example\Run_Env>C:\Users\Felix\Dev\FLINT\Source\build\bin\Debug\moja.cli.exe --config config/forest_config.json --config config/libs.gdal.chaprich.win.json --config_provider config/forest_provider.json
<2020-07-12 12:11:54.533434> (info) - Config has files: 2
<2020-07-12 12:11:54.534431> (info) - Using Logging Configuration: internal default
<2020-07-12 12:11:54.534431> (info) - Using configurations:
<2020-07-12 12:11:54.536580> (info) - config/forest_config.json
<2020-07-12 12:11:54.537425> (info) - config/libs.gdal.chaprich.win.json
<2020-07-12 12:11:54.537425> (info) - Using provider configurations:
<2020-07-12 12:11:54.538420> (info) - config/forest_provider.json
<2020-07-12 12:11:54.616213> (info) - Using operation manager: Simple
<2020-07-12 12:11:54.752561> (fatal) - main(296) - C:\Users\Felix\Dev\FLINT\Source\moja.modules.gdal\src\rasterreadergdal.cpp(67): Throw in function class Poco::Dynamic::Struct<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > __cdecl moja::modules::gdal::MetaDataRasterReaderGDAL::readMetaData(void) const
Dynamic exception type: struct boost::wrapexcept<struct moja::datarepository::FileNotFoundException>
std::exception::what: Unknown exception
[struct moja::datarepository::tag_filename * __ptr64] = C:\Users\Felix\Dev\FLINT.example\Run_Env\data\DMA_AL4.json

Operating Environment:

Additional context I see there is a file Run_Env\data\DMA_AL4.geojson but not sure if that is the same.

gmajan commented 4 years ago

Thank you Felix. Since this is a problem with the Chapman-Richards module, I think @leitchy might be the best person to help but school holidays might be causing some delays.

leitchy commented 4 years ago

Hi Felix , This appears to be the same problem as with Issue 17, you are running against a version of the FLINT that doesn't support the feature.

There were 2 options with the meta data required problem, use blank json files for each required meta data file OR make the requirement optional. For our use of the files we don't use the meta data, Chapman Richards doesn't either. GCBM does.

I selected the optional method and added the flag in FLINT to handle this. You can see in the commit the metadata_required flag has been added to the gdal raster reader provider. Chapman Richards makes use of this flag in the provider config

floybix commented 4 years ago

That makes sense. Thank you for your comprehensive explanation of the problem, I appreciate it.