mirror of
https://github.com/django/django.git
synced 2025-09-23 02:33:31 +00:00
Fixed #25797 -- Fixed regex for getting units from SRS WKT.
This commit is contained in:
parent
b52b9cf6f2
commit
717a54c883
2 changed files with 24 additions and 23 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue