oggm.global_tasks.write_centerlines_to_shape#

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=0, corner_cutting=0)[source]#

Write the centerlines to a shapefile.

Parameters
gdirs:

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

to_tarbool

put the files in a .tar file. If cfg.PARAMS[‘use_compression’], also compress to .gz

filesuffixstr

add a suffix to the output file

flowlines_outputbool

output the OGGM flowlines instead of the centerlines

geometrical_widths_outputbool

output the geometrical widths instead of the centerlines

corrected_widths_outputbool

output the corrected widths instead of the centerlines

ensure_exterior_matchbool

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.

to_crsstr

write the shape to another coordinate reference system (CRS)

keep_main_onlybool

write only the main flowlines to the output files

simplify_linefloat

apply shapely’s simplify method to the line before writing. It is a purely cosmetic option, although glacier length will be affected. 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.5

corner_cuttingint

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 5.