fix get_altitudes() again
This commit is contained in:
parent
7575605aae
commit
92749a5f16
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ class AltitudeArea(LevelGeometryMixin, models.Model):
|
|||
return np.full((points.shape[0], ), fill_value=float(self.altitude))
|
||||
|
||||
slope = np.array(self.point2) - np.array(self.point1)
|
||||
distances = np.sum(((points - np.array(self.point1)) * slope), axis=1) / (slope ** 2).sum().clip(0, 1)
|
||||
distances = (np.sum(((points - np.array(self.point1)) * slope), axis=1) / (slope ** 2).sum()).clip(0, 1)
|
||||
return self.altitude + distances*(self.altitude2-self.altitude)
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue