GRID to GRID draft: Difference between revisions
Content deleted Content added
Created page with "=Introduction= asc_to_asc.exe is a utility that can be used to perform a range of operations on gridded files. The input grids can be either ESRI ASCII grid (.asc) or binary..." |
No edit summary |
||
Line 1:
=Introduction=
This utility is useful for comparing and processing TUFLOW outputs from different .2dm meshes, which can't be compared with the <u>[[RES_to_RES| res_to_res.exe]]</u>.<br>
For some options (such as processing maximums or differences) the input (.asc or .flt) files must be of the same row/column dimensions.<br>
Line 40:
===GPKG and NetCDF===
GeoPackage and NetCDF are database formats and are able to contain multiple layers in a single file. When passing in an input or output reference to a GeoPackage or NetCDF file the layer name is assumed to be the same as the database name unless otherwise specified. To give the layer a different name than the database, use the following syntax <tt>"database.ext >> layer"</tt>:<Br>
<pre>
''<b>Note:</b>''
* ''quotes will always be required when using this syntax''
Line 53:
Multiple creation options can be used (each will require its own -co flag).<Br>
<Br>
The creation options have adopted the same naming as GDAL (more information on the options can be found at <b><u>[https://gdal.org https://gdal.org]</u></b>) however not all options in GDAL are supported in the
====GeoTIFF====
* COMPRESS=NONE/DEFLATE/LZW - output compression. Default - DEFLATE
Line 61:
* BIGTIFF=YES/NO/IF_NEEDED - Controls whether the ouput file uses the BigTIFF format or classic TIFF. Default - IF_NEEDED.
* TILED=YES/NO - Controls whether the output GeoTIFF should use tiles or strips. Default - NO.
* OVERVIEWS=YES/NO - Controls whether overviews (also known as pyramids) should be created. The
====Cloud Optimised GeoTIFF (COG)====
Line 80:
===Examples===
*Runs a difference operation on GeoTIFF outputs.<br>
:<tt>
* Runs a difference operation on GPKG outputs. The layer name needed is assumed to be the same as the database name.<br>
:<tt>
* Runs a difference operation on GeoPackage outputs where the layer name is different than the database name.<br>
:<tt>
* Converts an ASC grid to a GeoTIFF with an LZW compression and horizontal predictor.<br>
:<tt>
* Runs a maximum operation on all FLT grids in a given location and outputs to a GeoPackage raster.<br>
:<tt>
* Converts GeoTIFF to a Cloud Optimised GeoTIFF. Requires <tt>-out</tt> flag since the extension for COG is also '.tif' and therefore the default output file would be the same as the input file.<br>
:<tt>
=Operations=
Line 98:
Examples:<br>
*Converts all .flt grids to .asc format.<br>
:<tt>
*Converts the file "DEM_M01.asc" for .flt format.<br>
:<tt>
==Maximum==
Line 109:
Examples:<br>
*Creates a new grid containing the maximum of the 3 input water level grids.<br>
:<tt>
*As per item 2 above, but specifies the output name "Q100_Max_Levels.asc".<br>
:<tt>
*Wildcard character "*" is supported in filenames.<br>
:<tt>
==Difference==
'''"-dif"'''<br>
Takes the difference between the first two .asc files, the second grid is subtracted from the first. If an optional third .asc file is specified, this is used as the output file, otherwise,
Two .asc grids are output:
*The first is the difference values between the two .asc files. A difference value only occurs at grid cells that have a value in both grids. If the cell has a null value (ie. the TUFLOW output was dry at that location) in either or both .asc grids, a null value is output.
Line 123:
Example:
*Creates new grids comparing the differences in flood levels and extents for: "difference.asc" = "after_h.asc" - "before_h.asc"<br>
:<tt>
Secondary options (only one can be used):
Line 137:
Examples:
*Creates a new depth grid only where the depth is greater than 0.1m.<br>
:<tt>
*Creates a new level grid only where the depth is greater than 0.1m.<br>
:<tt>
*As per the example above, but sets the output name as "filtered_levels.asc".<br>
:<tt>
==Resize==
Line 150:
Example:
*Creates a new 10m DEM (DEM_10m.asc) based on the the 2m DEM using an averaging approach.<br>
:<tt>
===Minimum===
Line 156:
Example:
*Creates a new 10m DEM (DEM_10m_min.asc) based on the the 2m DEM using an minimum approach.<br>
:<tt>
===Maximum===
Line 162:
Example:
*Creates a new 10m DEM (DEM_10m_max.asc) based on the the 2m DEM using an maximum approach.<br>
:<tt>
==Transform==
Line 168:
Examples:
*Multiplies all values by 0.3048.<br>
:<tt>
*Multiplies all values by 0.3048 and then adds 10.0.<br>
:<tt>
==Decimal==
Line 176:
Example:
*Converts all .flt grids to .asc format with 5 decimal spaces.<br>
:<tt>
==Classify==
Line 194:
Examples:
*Outputs a classified grid, based on the cut off values and names in the "classifications.csv".<br>
:<tt>
*If using vertical mapper the -grc option can be used to create the .asc file in classified grid format, in this format rather than storing a numerical value when interrogating an area a label is returned. This format is not recognised by ArcMap or QGIS. If using the grc option it is also possible to specify the desired RGB (red, green, blue) values for the output grid in the .csv file used for the classification. The RGB values should be specified in the 3-5th columns of the .csv file.<br>
:<tt>
:{| class="wikitable"
Line 229:
'''NOTE:''' For the output GIS file, the '''dz''' attribute is set to 0.0 regardless of the value set in the input field. <br>
Example:
*<tt>
==Fuzzy Map==
Line 239:
Example:
*Create a fuzzy map from all maximum depth grids in the directory.<br>
:<tt>
==Histogram==
Line 288:
|}
*Example usage:
:<tt>
==Extract 1D Model Inputs==
Line 378:
|}
Example usage:
*<tt>
An example .egc file is:<br>
Line 406:
The out nodal area table extends from the minimum to the maximum elevation in the DEM. A user defined minimum value can be specified using the "Skew" attribute of the GIS region.<br>
Example usage:
*<tt>
==Calibration Points==
Line 418:
The second search radius used to search for maximum and minimum values in meters.<br>
Example usage:
*<tt>
==Statistics==
<big>'''"-stat<type>"'''</big>
As of the 2017-10-AA build, the
The available options are:
Line 442:
* An SRC grid: a grid listing which source input grid the median result value came from (a corresponding .csv file is also written as a legend)<br>
Example usage:
*<tt>
[[File: asc_to_asc_statsMedian_eg.PNG|1000px|]]<br>
Line 456:
* An SRC grid: a grid listing which source input grid the result value came from or was the next above (a corresponding .csv file is also written as a legend)<br>
Example usage:
*<tt>
==="-statFrac"===
Line 464:
* A Frac grid: the resulting Fraction value<br>
Example usage:
*<tt>
==="-statMin"===
Line 473:
* An SRC grid: a grid listing which source input grid the minimum result value came from (a corresponding .csv file is also written as a legend)<br>
Example usage:
*<tt>
==="-statMax"===
Line 482:
* An SRC grid: a grid listing which source input grid the maximum result value came from (a corresponding .csv file is also written as a legend)<br>
Example usage:
*<tt>
==="-statAll"===
Line 492:
* A .csv file that contains the legend for all SRC grids<br>
Example usage:
*<tt>
==="-statRank<integer id>"===
Line 501:
* An SRC grid: a grid listing which source input grid the ranked result value came from (a corresponding .csv file is also written as a legend)<br>
Example usage:
*<tt>
==Flood Extent==
Returns a simple grid with value of 1 where the input grid has an active, non-zero value.<br>
Example usage:
*<tt>
==Remap==
Line 517:
Examples:
*The utility can also remap additional map output grids (e.g. velocity, hazard and others) to the resolution of the DEM file, e.g.<br>
:<tt>
*The utility can also apply a buffer distance or add freeboard. For example, the below applies a buffer distance of 20m, and adds a freeboard of 0.2m to the original water level grid.<br>
:<tt>
:<tt>
Note that, for any output types other than depth, this utility does NOT interpolate the result from the coarser grid to the finer grid, but only extends/reduces the output extent to the dry/wet extent. More discussions on this function is documented here [[TUFLOW_Remapping | TUFLOW Remapping Tool]].<br>
Line 531:
! style="background-color:#005581; font-weight:bold; color:white;" width=80% | Description
|-
|"-b"|| Run the utility in batch mode, this suppresses the prompt to press enter at the end of processing. Used in .bat files where two or more files are to be processed. The -b flag should be placed after the
|-
|"-out <output grid name>"||Specify the output filename for the new grid. <br> '''Note:''' a space is required between the -out and the filename.
| |||