def extract_elevation_helper(self, p1, p2, features): lm = LayerMaker('test') lm.add_features(features) reader = ElevationReader( p1, p2, lm.layer, "elevation", self.layer_crs, self.measure_crs, ) reader.extract_elevations() return reader.points
def test_can_read_elevations(self): for name, details in STATIC_COORD_DATA.items(): reader = ElevationReader( details[START_PT], details[END_PT], self.test_layers[name], "elevation", self.layer_crs, self.measure_crs, ) reader.extract_elevations() points = reader.points self.assertGreater(len(points), 9) p_x = [p.x() for p in points] self.assertListEqual(p_x, sorted(p_x)) for point in points: self.assertTrue(10 < point.y()) self.assertTrue(point.y() < 200) self.assertTrue(0 <= point.x())
def extract_elevation_helper(self, p1, p2, features): lm = LayerMaker("test") lm.add_features(features) reader = ElevationReader(p1, p2, lm.layer, "elevation", self.layer_crs, self.measure_crs) reader.extract_elevations() return reader.points