mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #25797 -- Fixed regex for getting units from SRS WKT.
This commit is contained in:
committed by
Tim Graham
parent
b52b9cf6f2
commit
717a54c883
@@ -21,12 +21,7 @@ class SpatialRefSysMixin(object):
|
||||
# TODO: Figure out how to pull out angular units of projected coordinate system and
|
||||
# fix for LOCAL_CS types. GDAL should be highly recommended for performing
|
||||
# distance queries.
|
||||
units_regex = re.compile(
|
||||
r'.+UNIT ?\["(?P<unit_name>[\w \'\(\)]+)", ?(?P<unit>[\d\.]+)'
|
||||
r'(,AUTHORITY\["(?P<unit_auth_name>[\w \'\(\)]+)",'
|
||||
r'"(?P<unit_auth_val>\d+)"\])?\]([\w ]+)?(,'
|
||||
r'AUTHORITY\["(?P<auth_name>[\w \'\(\)]+)","(?P<auth_val>\d+)"\])?\]$'
|
||||
)
|
||||
units_regex = re.compile(r'.+UNIT ?\["(?P<unit_name>[\w \.\'\(\)]+)", ?(?P<unit>[^ ,\]]+)', re.DOTALL)
|
||||
|
||||
@property
|
||||
def srs(self):
|
||||
|
||||
Reference in New Issue
Block a user