|
9 | 9 | ) |
10 | 10 | from .m2l_enums import Datatype |
11 | 11 | from .interpolators import DipDipDirectionInterpolator |
12 | | -from .mapdata import MapData |
| 12 | +from .mapdata import MapData, get_value_from_raster |
13 | 13 |
|
14 | 14 | from .logging import getLogger |
15 | 15 | logger = getLogger(__name__) |
@@ -358,13 +358,13 @@ def compute( |
358 | 358 | p1[0] = numpy.asarray(short_line[0].coords[0][0]) |
359 | 359 | p1[1] = numpy.asarray(short_line[0].coords[0][1]) |
360 | 360 | # get the elevation Z of the end point p1 |
361 | | - p1[2] = map_data.get_value_from_raster(Datatype.DTM, p1[0], p1[1]) |
| 361 | + p1[2] = get_value_from_raster(Datatype.DTM, p1[0], p1[1]) |
362 | 362 | # create array to store xyz coordinates of the end point p2 |
363 | 363 | p2 = numpy.zeros(3) |
364 | 364 | p2[0] = numpy.asarray(short_line[0].coords[-1][0]) |
365 | 365 | p2[1] = numpy.asarray(short_line[0].coords[-1][1]) |
366 | 366 | # get the elevation Z of the end point p2 |
367 | | - p2[2] = map_data.get_value_from_raster(Datatype.DTM, p2[0], p2[1]) |
| 367 | + p2[2] = get_value_from_raster(Datatype.DTM, p2[0], p2[1]) |
368 | 368 | # calculate the length of the shortest line |
369 | 369 | line_length = scipy.spatial.distance.euclidean(p1, p2) |
370 | 370 | # find the indices of the points that are within 5% of the length of the shortest line |
|
0 commit comments