Skip to content

Commit

Permalink
add support for compound EPSG + urn strings
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed May 4, 2019
1 parent 0744406 commit a4e5f93
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproj/_crs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ cdef class _CRS(Base):
def __init__(self, proj_string):
# setup proj initialization string.
if not is_wkt(proj_string) \
and not re.match("^[A-Za-z]+(:)?\d+$", proj_string.strip())\
and "=" in proj_string\
and "type=crs" not in proj_string:
proj_string += " +type=crs"
# initialize projection
Expand Down
10 changes: 10 additions & 0 deletions test/test_crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,3 +555,13 @@ def test_coordinate_operation_towgs84_missing():
def test_itrf_init():
crs = CRS("ITRF2000")
assert crs.name == "ITRF2000"


def test_compound_crs_init():
crs = CRS("EPSG:2393+5717")
assert crs.name == "KKJ / Finland Uniform Coordinate System + N60 height"


def test_compound_crs_urn_init():
crs = CRS("urn:ogc:def:crs,crs:EPSG::2393,crs:EPSG::5717")
assert crs.name == "KKJ / Finland Uniform Coordinate System + N60 height"

0 comments on commit a4e5f93

Please sign in to comment.