Пример #1
0
 def test_pixels_to_lon_lat_1(self):
     gmp = GlobalMercatorProfile()
     point = PixelsPoint(1, 2)
     try:
         gmp.to_lon_lat(point)
         assert False
     except NotImplementedError as e:
         assert e is not None and type(e) == NotImplementedError
Пример #2
0
 def test_lon_lat_to_lon_lat_1(self):
     gmp = GlobalMercatorProfile()
     point = LonLatPoint(123.4567890, 98.7654321)
     result = gmp.to_lon_lat(point)
     assert point.lon == result.lon and \
         point.lat == result.lat
Пример #3
0
 def test_meters_to_lon_lat_1(self):
     gmp = GlobalMercatorProfile()
     point = MetersPoint(20037508.342789244, 20037508.342789244)
     result = gmp.to_lon_lat(point)
     assert result.lon == 180.0 and \
         result.lat == 85.0511287798066