mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Simplified GDAL import
This commit is contained in:
parent
4697bee70f
commit
1beaf909f0
1 changed files with 6 additions and 12 deletions
|
@ -67,19 +67,13 @@ else:
|
|||
|
||||
# Will need to install OSGeo4W for this!
|
||||
if os.name == 'nt':
|
||||
OSGEO4W = r"C:\OSGeo4W"
|
||||
if not os.path.isdir(OSGEO4W):
|
||||
OSGEO4W += '64'
|
||||
os.environ['OSGEO4W_ROOT'] = OSGEO4W
|
||||
os.environ['GDAL_DATA'] = "C:\Program Files\GDAL\gdal-data"
|
||||
os.environ['PROJ_LIB'] = OSGEO4W + r"\share\proj"
|
||||
GDAL_LIBRARY_PATH = r'C:\OSGeo4W64\bin\gdal204'
|
||||
os.environ['PATH'] = OSGEO4W + r"\bin;" + os.environ['PATH']
|
||||
VIRTUAL_ENV_BASE = os.environ['VIRTUAL_ENV']
|
||||
os.environ['PATH'] = os.path.join(
|
||||
VIRTUAL_ENV_BASE, r'.\Lib\site-packages\osgeo') + ';' + os.environ['PATH']
|
||||
os.environ['PROJ_LIB'] = os.path.join(
|
||||
VIRTUAL_ENV_BASE, r'.\Lib\site-packages\osgeo\data\proj') + ';' + os.environ['PATH']
|
||||
|
||||
GEOS_LIBRARY_PATH = str(os.environ.get('VIRTUAL_ENV') +
|
||||
r"\Lib\site-packages\osgeo\geos_c.dll")
|
||||
GDAL_LIBRARY_PATH = str(os.environ.get('VIRTUAL_ENV') +
|
||||
r"\Lib\site-packages\osgeo\gdal304.dll")
|
||||
# To-do: Linux GDAL support here
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'daphne',
|
||||
|
|
Loading…
Reference in a new issue