如何在 Windows 上为 GeoDjango 安装 GEOS
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5177498/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How To Install GEOS for GeoDjango on Windows
提问by Siavash
I'm starting a GeoDjango project using Python 2.5, Django 1.2, MySQL and Apache. The project will be uploaded to a Linux server but the development will be on a Windows.
我正在使用 Python 2.5、Django 1.2、MySQL 和 Apache 启动一个 GeoDjango 项目。该项目将上传到 Linux 服务器,但开发将在 Windows 上进行。
The problem is I just can't get passed installing GEOS, how is it done?
问题是我无法通过安装 GEOS,它是如何完成的?
采纳答案by diegueus9
I follow the instructions in
我按照说明
http://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#windows
http://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#windows
For the instalation of GEOS library in windows i use this:
为了在 Windows 中安装 GEOS 库,我使用了这个:
回答by TonyTony
what I did is to install GDAL from this answer, Unable to install Python and GDAL (DLL load failed), and then add this line to settings.py
,
我所做的是从这个答案中安装 GDAL,Unable to install Python and GDAL (DLL load failed),然后将此行添加到settings.py
,
GEOS_LIBRARY_PATH = 'C:/Program Files/GDAL/geos_c.dll'
then it is fine to use postgis.
那么使用postgis就可以了。
回答by Jorge Vidinha
Follow this tutorial it will Install GDAL complete library including GEOS. Just did it yesterday worked fine
按照本教程,它将安装 GDAL 完整库,包括 GEOS。昨天刚做的很好用
http://www.gis.usu.edu/~chrisg/python/2009/docs/gdal_win.pdf
http://www.gis.usu.edu/~chrisg/python/2009/docs/gdal_win.pdf