in3Utils.geoTrans.prepareLine
- prepareLine(dem, avapath, distance, Point=None, k=3, s=None)[source]
Resample and project line on dem 1- Resample the avapath line with an interval of approximately distance in meters between points (projected distance on the horizontal plane). 2- Make avalanche profile out of the path (affect a z value using the dem) 3- Get projection of points on the profil (closest point)
- Parameters
dem (dict) – dem dictionary
avapath (dict) – line dictionary
distance (float) – resampling distance
Point (dict) – a point dictionary (optional, can contain several point)
k (int) – Degree of the spline for splprep. Set to splprep default of 3, use 1 if you want to lower the level of spline (3 is cubic)
s (float) – A smoothing condition for splprep. Defaults to None (i.e. splprep default), set to 0 if you want to minimize the distance between new line and old line
- Returns
avaProfile (dict) – the resampled avapath with the z coordinate
projPoint (dict) – point dictionary projected on the profile (if several points were give in input, only the closest point to the profile is projected)