digger.utils.fgtools
¶
Module Contents¶
Functions¶
API¶
- digger.utils.fgtools.fg2raster(filein: str, fileout: str, varname: str, epsg: int, fgtype: str = 'fgout')¶
Convert a single variable from a clawpack fixed grid file to a geotif.
- Inputs:
- fileinstr
Path of fixed grid file. Can be either a FGOut file or a FGMax file
- fileoutstr
Path of output geotif.
- varname:str
Variable name to write out.
- epsg:int
EPSG code used to assign coordinate reference
- fgtype: str
Fixed grid type. Either ‘fixed_grid’ or ‘max_grid’.
- Outputs:
None
- digger.utils.fgtools.fg2shp(filein: str, fileout: str, varname: str, contours: list, epsg: int | None = None, fgtype: str = 'fgout', geom_type: str = 'MultiLineString')¶
Convert a single variable from a clawpack fixed grid file to a vector file.
- Inputs:
- fileinstr
Path of fixed grid file. Can be either a FGOut file or a FGMax file
- fileoutstr
Path of output vector file. If fileout ends with ‘shp’, a shapefile will be written. If it ends with ‘geojson’ a GeoJson will be written.
- varnamestr
Variable name to write out.
- contourslist
A list of levels to use as the contour values.
- epsgint
EPSG code used to assign coordinate reference (optional)
- fgtypestr
Fixed grid type. Either ‘fixed_grid’ or ‘max_grid’.
- geom_typestr
Either “MultiPolygon” for polygons or “MultiLineString” for line strings. The former gives the entire area whereas the latter gives the edges of the area impacted with varname>contours.
- Outputs:
None