示例#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
示例#2
0
def test_get_codes(auth, pj_type, deprecated):
    assert get_codes(auth, pj_type, deprecated)
示例#3
0
def test_get_codes__invalid_code():
    with pytest.raises(ValueError):
        get_codes("ITRF", "frank")
示例#4
0
def test_get_codes__invalid_auth():
    with pytest.raises(TypeError):
        get_codes(123, PJType.BOUND_CRS)
示例#5
0
def test_get_codes__empty(auth, pj_type):
    assert not get_codes(auth, pj_type)