- oggm.global_tasks.write_centerlines_to_shape(gdirs, *, path=True, to_tar=False, to_crs='EPSG:4326', filesuffix='', flowlines_output=False, ensure_exterior_match=False, geometrical_widths_output=False, corrected_widths_output=False, keep_main_only=False, simplify_line_before=0, corner_cutting=0, simplify_line_after=0)#
Write the centerlines to a shapefile.
the list of GlacierDir to process.
- path: str or bool
Set to “True” in order to store the shape in the working directory Set to a str path to store the file to your chosen location
put the files in a .tar file. If cfg.PARAMS[‘use_compression’], also compress to .gz
add a suffix to the output file
output the OGGM flowlines instead of the centerlines
output the geometrical widths instead of the centerlines
output the corrected widths instead of the centerlines
per design, the centerlines will match the underlying DEM grid. This may imply that they do not “touch” the exterior outlines of the glacier in vector space. Set this to True to correct for that.
write the shape to another coordinate reference system (CRS)
write only the main flowlines to the output files
apply shapely’s simplify method to the line before corner cutting. It is a cosmetic option: it avoids hard “angles” in the centerlines. All points in the simplified object will be within the tolerance distance of the original geometry (units: grid points). A good value to test first is 0.75
apply the Chaikin’s corner cutting algorithm to the geometry before writing. The integer represents the number of refinements to apply. A good first value to test is 3.
apply shapely’s simplify method to the line after corner cutting. This is to reduce the size of the geometeries after they have been smoothed. The default value of 0 is fine if you use corner cutting less than 4. Otherwize try a small number, like 0.05 or 0.1.