Exemple #1
0
    def testgraticule(self):
        g = graticule.graticule((0, 0, 2, 2), 1)

        fixture1 = [(0, i / 2.) for i in range(9)]
        fixture2 = [(1, i / 2.) for i in range(9)]

        self.assertSequenceEqual(list(next(g).get('geometry').get('coordinates')), fixture1)
        self.assertSequenceEqual(list(next(g).get('geometry').get('coordinates')), fixture2)
Exemple #2
0
    def testgraticule(self):
        g = graticule.graticule((0, 0, 2, 2), 1)

        fixture1 = [(0, i / 2.) for i in range(9)]
        fixture2 = [(1, i / 2.) for i in range(9)]

        self.assertSequenceEqual(
            next(g).get('geometry').get('coordinates'), fixture1)
        self.assertSequenceEqual(
            next(g).get('geometry').get('coordinates'), fixture2)
Exemple #3
0
 def testErr(self):
     with self.assertRaises(ValueError):
         g = graticule.graticule((16.34, -34.81, 32.83, -22.09), step=10000, crs_or_method='file')
         next(g)
Exemple #4
0
 def testCRS(self):
     g = graticule.graticule((16.34, -34.81, 32.83, -22.09), step=10000, crs_or_method='utm')
     a = next(g)
     assert isinstance(a, dict)
Exemple #5
0
 def testErr(self):
     with self.assertRaises(ValueError):
         g = graticule.graticule((16.34, -34.81, 32.83, -22.09),
                                 step=10000,
                                 crs='file')
         next(g)
Exemple #6
0
 def testCRS(self):
     g = graticule.graticule((16.34, -34.81, 32.83, -22.09),
                             step=10000,
                             crs='utm')
     a = next(g)
     assert isinstance(a, dict)
Exemple #7
0
 def testErr(self):
     with self.assertRaises(SvgisError):
         g = graticule.graticule((16.34, -34.81, 32.83, -22.09),
                                 step=10000,
                                 crs_or_method='file')
         next(g)
Exemple #8
0
 def testCRS(self):
     g = graticule.graticule((16.34, -34.81, 32.83, -22.09),
                             step=10000,
                             crs_or_method='utm')
     a = next(g)
     self.assertIsInstance(a, dict)