配置geoDjango

详细参见官网文档

https://docs.djangoproject.com/en/1.11/ref/contrib/gis/tutorial/

https://docs.djangoproject.com/en/1.11/ref/contrib/gis/install/#windows


先安装PostGIS,用来配置PostgreSQL数据库

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads


安装psycopg2包,用于在python中访问PostgreSQL

pip install psycopg2

anaconda也可以


安装OSGeo4W,这样有些地理处理的包好安装

设置环境变量

set OSGEO4W_ROOT=C:\OSGeo4W64
set PYTHON_ROOT=E:\ProgramBig\Anaconda3
set GDAL_LIBRARY_PATH=%OSGEO4W_ROOT%\share\gdal
set PROJ_LIB=%OSGEO4W_ROOT%\share\proj
set PATH=%PATH%;%PYTHON_ROOT%;%OSGEO4W_ROOT%\bin
reg ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /f /d "%PATH%"
reg ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v GDAL_LIBRARY_PATH /t REG_EXPAND_SZ /f /d "%GDAL_LIBRARY_PATH%"
reg ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROJ_LIB /t REG_EXPAND_SZ /f /d "%PROJ_LIB%"


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值