def test_on_land(self): gmap = RasterMap(refloat_halflife=6, bitmap_array=self.raster, map_bounds=((-50, -30), (-50, 30), (50, 30), (50, -30)), projection=NoProjection()) # hours assert gmap.on_land((10, 3, 0)) == 1 assert gmap.on_land((9, 3, 0)) == 0 assert gmap.on_land((11, 3, 0)) == 0
def test_on_land(self): gmap = RasterMap(refloat_halflife=6, bitmap_array=self.raster, map_bounds=((-50, -30), (-50, 30), (50, 30), (50, -30)), projection=NoProjection()) # hours print 'testing a land point:', (10, 6, 0.) print gmap.on_land((10, 6, 0.)) assert gmap.on_land((10, 6, 0.)) # right in the middle print 'testing a water point:' assert not gmap.on_land((19.0, 11.0, 0.))