Exemplo n.º 1
0
def test_get_set_srid():
    actual = pygeos.set_srid(point, 4326)
    assert pygeos.get_srid(point) == 0
    assert pygeos.get_srid(actual) == 4326
Exemplo n.º 2
0
def test_pickle_with_srid():
    geom = pygeos.set_srid(point, 4326)
    pickled = pickle.dumps(geom)
    assert pygeos.get_srid(pickle.loads(pickled)) == 4326
Exemplo n.º 3
0
def test_get_srid():
    """All geometry types have no SRID by default; None returns -1"""
    actual = pygeos.get_srid(all_types + (None, )).tolist()
    assert actual == [0, 0, 0, 0, 0, 0, 0, 0, 0, -1]
Exemplo n.º 4
0
def test_to_wkb_point_empty_srid():
    expected = pygeos.set_srid(empty_point, 4236)
    wkb = pygeos.to_wkb(expected, include_srid=True)
    actual = pygeos.from_wkb(wkb)
    assert pygeos.get_srid(actual) == 4236