1
0
mirror of https://github.com/django/django.git synced 2025-07-05 10:19:20 +00:00

gis: gdal: Fixed new _version_info definition for win32 platforms; made GeoJSON regex more strict.

git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Justin Bronn 2008-02-18 03:03:25 +00:00
parent ccf9baca86
commit bdab7abe2c
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ from django.contrib.gis.gdal.prototypes.srs import clone_srs
# Regular expressions for recognizing HEXEWKB and WKT. # Regular expressions for recognizing HEXEWKB and WKT.
hex_regex = re.compile(r'^[0-9A-F]+$', re.I) hex_regex = re.compile(r'^[0-9A-F]+$', re.I)
wkt_regex = re.compile(r'^(?P<type>POINT|LINESTRING|LINEARRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)[ACEGIMLONPSRUTY\d,\.\-\(\) ]+$', re.I) wkt_regex = re.compile(r'^(?P<type>POINT|LINESTRING|LINEARRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)[ACEGIMLONPSRUTY\d,\.\-\(\) ]+$', re.I)
json_regex = re.compile(r'^\{.+\}$') json_regex = re.compile(r'^\{[\s\w,\.\"\'\:\[\]]+\}$')
#### OGRGeometry Class #### #### OGRGeometry Class ####
class OGRGeometry(object): class OGRGeometry(object):

View File

@ -50,7 +50,7 @@ def std_call(func):
#### Version-information functions. #### #### Version-information functions. ####
# Returns GDAL library version information with the given key. # Returns GDAL library version information with the given key.
_version_info = lgdal.GDALVersionInfo _version_info = std_call('GDALVersionInfo')
_version_info.argtypes = [c_char_p] _version_info.argtypes = [c_char_p]
_version_info.restype = c_char_p _version_info.restype = c_char_p