Exemplo n.º 1
0
 def test_inverting(self):
     for _ in range(500):
         lon, lat = rand()
         epsg = stateplane.identify(lon, lat)
         e, n = stateplane.from_lonlat(lon, lat)
         x, y = stateplane.to_lonlat(e, n, epsg=epsg)
         self.assertAlmostEqual(lon, x)
         self.assertAlmostEqual(lat, y)
Exemplo n.º 2
0
    def test_tolonlat(self):
        x, y = stateplane.to_lonlat(817080.8169336573, 99364.28495057777, epsg='32129')
        self.assertAlmostEqual(x, -75.2)
        self.assertAlmostEqual(y, 40.2)

        y, x = stateplane.to_latlon(817080.8169336573, 99364.28495057777, epsg='32129')
        self.assertAlmostEqual(x, -75.2)
        self.assertAlmostEqual(y, 40.2)
Exemplo n.º 3
0
 def test_inverting(self):
     for _ in range(500):
         lon, lat = rand()
         epsg = stateplane.identify(lon, lat)
         e, n = stateplane.from_lonlat(lon, lat)
         x, y = stateplane.to_lonlat(e, n, epsg=epsg)
         self.assertAlmostEqual(lon, x)
         self.assertAlmostEqual(lat, y)
Exemplo n.º 4
0
    def test_tolonlat(self):
        x, y = stateplane.to_lonlat(817080.8169336573, 99364.28495057777, epsg='32129')
        self.assertAlmostEqual(x, -75.2)
        self.assertAlmostEqual(y, 40.2)

        y, x = stateplane.to_latlon(817080.8169336573, 99364.28495057777, epsg='32129')
        self.assertAlmostEqual(x, -75.2)
        self.assertAlmostEqual(y, 40.2)
Exemplo n.º 5
0
 def test_tolonlat_err(self):
     with self.assertRaises(ValueError):
         stateplane.to_latlon(817080.8169336573, 99364.28495057777)
         stateplane.to_lonlat(817080.8169336573, 99364.28495057777)
Exemplo n.º 6
0
 def test_tolonlat_err(self):
     with self.assertRaises(ValueError):
         stateplane.to_latlon(817080.8169336573, 99364.28495057777)
         stateplane.to_lonlat(817080.8169336573, 99364.28495057777)