Пример #1
0
 def test_lon_lat_to_raster_1(self):
     gmp = GlobalMercatorProfile()
     point = LonLatPoint(180.0, 90.0)
     try:
         gmp.to_raster(point, zoom=0)
         assert False
     except NotImplementedError as e:
         assert e is not None and type(e) == NotImplementedError
Пример #2
0
 def test_pixels_to_raster_3(self):
     gmp = GlobalMercatorProfile()
     point = PixelsPoint(512, 0)
     try:
         gmp.to_raster(point, foo=1)
         assert False
     except KeyError as e:
         assert e is not None and type(e) == KeyError
Пример #3
0
 def test_pixels_to_raster_2(self):
     gmp = GlobalMercatorProfile()
     point = PixelsPoint(512, 0)
     [x, y] = gmp.to_raster(point, zoom=1)
     assert x == 512 and y == 512
Пример #4
0
 def test_pixels_to_raster_1(self):
     gmp = GlobalMercatorProfile()
     point = PixelsPoint(256, 256)
     [x, y] = gmp.to_raster(point, zoom=0)
     assert x == 256 and y == 0