def test_area_has_nice_ratio_if_square_enough(self):
     geom = LineString((0, 0), (1000, 1000), srid=settings.SRID)
     area = AltimetryHelper.elevation_area(geom)
     self.assertEqual(area['size']['x'], 1300.0)
     self.assertEqual(area['size']['y'], 1300.0)
 def test_resolution_step_depends_on_geometry_size(self):
     self.assertEqual(self.area['resolution']['step'], 25)
     geom = LineString((100, 370), (100100, 370), srid=settings.SRID)
     area = AltimetryHelper.elevation_area(geom)
     self.assertEqual(area['resolution']['step'], 866)
 def setUp(self):
     self._fill_raster()
     self.geom = LineString((100, 370), (1100, 370), srid=settings.SRID)
     self.area = AltimetryHelper.elevation_area(self.geom)
示例#4
0
 def test_resolution_step_depends_on_geometry_size(self):
     self.assertEqual(self.area['resolution']['step'], 25)
     geom = LineString((100, 370), (100100, 370), srid=settings.SRID)
     area = AltimetryHelper.elevation_area(geom)
     self.assertEqual(area['resolution']['step'], 866)
示例#5
0
 def test_area_has_nice_ratio_if_square_enough(self):
     geom = LineString((0, 0), (1000, 1000), srid=settings.SRID)
     area = AltimetryHelper.elevation_area(geom)
     self.assertEqual(area['size']['x'], 1300.0)
     self.assertEqual(area['size']['y'], 1300.0)
示例#6
0
 def setUp(self):
     self._fill_raster()
     self.geom = LineString((100, 370), (1100, 370), srid=settings.SRID)
     self.area = AltimetryHelper.elevation_area(self.geom)
示例#7
0
 def test_area_small_geom(self):
     geom = LineString((10, 10), (10, 5), srid=settings.SRID)
     area = AltimetryHelper.elevation_area(geom)
     extent = area['extent']
     self.assertEqual(extent['altitudes']['max'], 30)
     self.assertEqual(extent['altitudes']['min'], 30)