Пример #1
0
def test_Location___init__():
    l = Location(*xy)
    assert True
Пример #2
0
def test_Location___str__():
    l1 = Location(*xy)
    assert str(l1) == '(9.00000,5.00000)'
Пример #3
0
def test_Location___ne__():
    l1 = Location(*xy)
    l3 = Location(xy[0], xy[1]+0.001)
    assert l1 != l3
Пример #4
0
def test_Location___hash__():
    l = Location(*xy)
    assert hash(l) == 4109769254643766781
Пример #5
0
def test_Location_latlon():
    pt = geom.point(*xy, srs=4326)
    pt.TransformTo(EPSG3035)

    l1 = Location.fromPointGeom(pt)
    assert np.isclose(l1.latlon, (xy[1], xy[0])).all()
Пример #6
0
def test_Location___hash__():
    l = Location(*xy)
    assert isinstance(hash(l), int)