Ejemplo n.º 1
0
    def run2d(self, test_func):

        p1 = GeoTypes.OGmultiLineStringFromOGLineStrings(
            GeoTypes.OGlineStringFromSequence(((1.0, 2.0), (3.0, 4.0))),
            GeoTypes.OGlineStringFromSequence(((5.0, 6.0), (7.0, 8.0))))
        p2 = GeoTypes.OGmultiLineStringFromOGLineStrings(
            GeoTypes.OGlineStringFromSequence(((1.0, 2.0), (3.0, 4.0))),
            GeoTypes.OGlineStringFromSequence(((5.0, 6.0), (7.0, 8.0))))

        raw = test_func(self, p1, p2)
        ret = raw[0]

        p3 = ret[0]
        p4 = ret[1]

        assert p3.__class__.__name__ == "OGMultiLineString"
        assert p4.__class__.__name__ == "OGMultiLineString"
Ejemplo n.º 2
0
    def run2d(self, test_func):

        p1 = GeoTypes.OGlineStringFromSequence(((1.0, 2.0), (3.0, 4.0)))
        p2 = GeoTypes.OGlineStringFromSequence(((5.0, 6.0), (7.0, 8.0)))

        raw = test_func(self, p1, p2)
        ret = raw[0]

        p3 = ret[0]
        p4 = ret[1]

        assert p3.__class__.__name__ == "OGLineString"
        assert p4.__class__.__name__ == "OGLineString"
        assert p3[0].getX() == 1.0
        assert p3[0].getY() == 2.0
        assert p3[1].getX() == 3.0
        assert p3[1].getY() == 4.0
        assert p4[0].getX() == 5.0
        assert p4[0].getY() == 6.0