Beispiel #1
0
def get_valid_epsgs() -> Set[str]:
    """Retruns a Set of valid and not deprecated EPSG codes

    Returns
    -------
    Set[str]
        The valid EPSG codes
    """
    valid_epsgs = {"CRS:84"}
    for pj_type in PJType:
        valid_epsgs.update(
            map(
                lambda x: f"EPSG:{x}",
                get_codes("EPSG", pj_type, allow_deprecated=False),
            ))
    return valid_epsgs
Beispiel #2
0
def test_get_codes(auth, pj_type, deprecated):
    assert get_codes(auth, pj_type, deprecated)
Beispiel #3
0
def test_get_codes__invalid_code():
    with pytest.raises(ValueError):
        get_codes("ITRF", "frank")
Beispiel #4
0
def test_get_codes__invalid_auth():
    with pytest.raises(TypeError):
        get_codes(123, PJType.BOUND_CRS)
Beispiel #5
0
def test_get_codes__empty(auth, pj_type):
    assert not get_codes(auth, pj_type)