firetools / qgis2fds

An open source and free tool to export terrain elevation, landuse, and georeferencing to NIST FDS for computational fluid dynamics (CFD) wildfire or atmospheric pollutants dispersion simulations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exported qgis_processing command parse error

sterlingbaldwin opened this issue · comments

Im brand new to qgis2fds, so its very possible Im doing something wrong, but when I hit the "Copy as qgis_process Command" button and paste it into the terminal, I get the following error:

>>> qgis_process run Export to NIST FDS:Export terrain --distance_units=meters --area_units=m2 --ellipsoid=EPSG:7030 --chid=terrain --fds_path=/Applications/FDS/FDS6/bin/--extent='-115.503681027,-114.315485640,32.110138889,33.160138889 [EPSG:4326]' --dem_layer=/simulations/eb54bf07/topo.tif --dem_sampling=1 --landuse_type_filepath= --wind_filepath= --tex_pixel_size=4 --nmesh=4 --cell_size=10 --sampling_layer=TEMPORARY_OUTPUT --export_obst=true
Invalid parameter value to. Parameter values must be entered after "--" e.g.
  Example:
    qgis_process run algorithm_name -- PARAM1=VALUE PARAM2=42"

I checked the qgis_process algorithm list, and see the Export to NIST FDS listed:

Export to NIST FDS
      Export to NIST FDS:Export terrain   Export terrain

Am I using doing this wrong, or is there actually an issue here?

Of course!

This morning I am working on the issue.

The command has to be formatted like this:

qgis_process run "processing tool name" --PROJECT_PATH="base project path" -- parameter1=value1 ...

In fact this is the command that works:

qgis_process run "Export to NIST FDS:Export terrain" --PROJECT_PATH="/home/egissi/github/qgisfds.verification/tests/test_golden_gate_local/golden_gate_local.qgs" -- distance_units=meters  area_units=m2  ellipsoid=EPSG:7019  chid=golden_gate_local  fds_path=./fds  extent='-122.491206899,-122.481181391,37.827810126,37.833676214 [EPSG:4326]'  pixel_size='5' origin='-2279076.207440,1963675.963121 [EPSG:5070]'  dem_layer=/home/egissi/github/qgisfds.verification/tests/test_golden_gate_local/US_DEM2016_local.tif landuse_layer=/home/egissi/github/qgisfds.verification/tests/test_golden_gate_local/US_210F13_21_local.tif  landuse_type_filepath=./Landfire.gov_F13.csv fire_layer='/home/egissi/github/qgisfds.verification/tests/test_golden_gate_local/fire.shx|layername=fire' wind_filepath=./wind.csv tex_pixel_size=1 nmesh=4 export_obst=false project_crs=EPSG:5070

While running from the command shell I discovered other bugs. I am fixing them, and will issue a new release asap.
I will keep you posted.

--PROJECT_PATH=/something/something.qgis

Does this mean I need to create a project in QGIS manually before I can invoke the qgis_process command?

It is easier to have a model project with the datasources already set. From that you can extract any land parcel in the world.

I committed all fixes. The master version (https://github.com/firetools/qgis2fds/archive/refs/heads/master.zip) should now work from the command line. As an added bonus you have all the new features (eg. DEM interpolation) I was working on.

Run from the command line with:
qgis_process run "processing tool name" --PROJECT_PATH="base project path" -- parameter1=value1 ...

And let me know if it works! If it does I am closing this bug and releasing the new version.

I think its working, or at least Im getting output now.