Skip to content

Commit f1af956

Browse files
authored
Fix coord string recognition
Add "ETRS " in front of string if not recognize with the first try
1 parent 6873698 commit f1af956

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyinfraformat/core/coord_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ def coord_str_recognize(input_string):
4747
except pyproj.exceptions.CRSError as error:
4848
error_string = error.args[0]
4949
if "several objects matching this name" not in error_string:
50+
if "unrecognized format / unknown name" in error_string:
51+
return pyproj.CRS.from_user_input("ETRS " + input_string)
5052
raise
5153
error_string = error_string[error_string.rfind(": ") + 2 : -1]
5254
projections = error_string.split(",")

0 commit comments

Comments
 (0)