+ // Check if osm-file is set and points to a valid file if --all or --import-data is given
+ if ($aCMDResult['import-data'] || $aCMDResult['all'])
+ {
+ if (!isset($aCMDResult['osm-file']))
+ {
+ fail('missing --osm-file for data import');
+ }
+
+ if (!file_exists($aCMDResult['osm-file']))
+ {
+ fail('the path supplied to --osm-file does not exist');
+ }
+
+ if (!is_readable($aCMDResult['osm-file']))
+ {
+ fail('osm-file "'.$aCMDResult['osm-file'].'" not readable');
+ }
+ }
+
+