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.
GNU General Public License v3.0
17 stars 13 forks source link

How to modify Landfire files #54

Closed mcgratta closed 1 year ago

mcgratta commented 1 year ago

I know this isn't an issue, but does anyone know how to modify a Landfire Geo Tiff file. In other words change one or two tiles?

Also, do you want to activate the Discussion functionality for this GitHub repository?

rmcdermo commented 1 year ago

Kevin, Try to see if you can open the tif in Matlab using the image processing toolkit. That will return an array. Then you can just edit the values in the array.

Yes, I’ll turn on Discussions once I log in with my computer.

On Mon, Jul 3, 2023 at 11:56 AM Kevin McGrattan @.***> wrote:

I know this isn't an issue, but does anyone know how to modify a Landfire Geo Tiff file. In other words change one or two tiles?

Also, do you want to activate the Discussion functionality for this GitHub repository?

— Reply to this email directly, view it on GitHub https://github.com/firetools/qgis2fds/issues/54, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBWXQJZLNV63MK27YVDP53XOLTRBANCNFSM6AAAAAAZ4UP2EU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Sent from my iPhone

johodges commented 1 year ago

The typical approach is to develop disturbance maps and then modify the data using the Landfire total fuel change tool (https://landfire.gov/download_lftfc.php). There is guidance on how to use the tool with some examples in the guide on the landfire site (https://www.conservationgateway.org/ConservationPractices/FireLandscapes/LANDFIRE/Documents/ModifyingLF_DataGuide_V1.pdf).

As Randy mentioned, the data is stored as a geotiff, so you can directly modify the pixel values in any environment which can edit this data format. If you have pretty simple rules you want to apply you can use the raster calculator within QGIS. In the past I have done pixel by pixel editing within a separate python environment or in a photo editing tool like photoshop or paint.net (https://www.getpaint.net/). You have to be careful with your bit depth and channels when using photo editing tools.

mcgratta commented 1 year ago

We found a QGIS plug-in called Serval that appears to work. We'll write up a wiki.

mcgratta commented 1 year ago

Editing GeoTIFF Files

There may be times when locally saved GeoTiff files require slight editing. For example, if you want to modify a locally saved LANDFIRE map. Here is one way to do it.

I have not had a chance to try this because some server is down, but let me know if it works for you and if so, could you add it to the wiki pages.

emanuelegissi commented 1 year ago

Done:

https://github.com/firetools/qgis2fds/wiki/Edit-raster-layers