Installing PrimaGIS in Windows
This page provides steps for installing a base system in a Windows environment for PrimaGIS.
Foreword
PrimaGIS is aiming towards Zope3, and much of the functionality in the
current Dublin branch may be available via Five in the near future. To
this end, it is important to ensure you are running Plone 2.1 or greater, on
top of Zope 2.86 or greater.
The windows binary installer only comes with Zope 2.78, but it is not too
hard to download the components separately.
The following are instructions to install PrimaGIS on a CLEAN windows
machine. You should end up with a working copy of the latest PrimaGIS
cvs trunk, running on Zope 2.86 and Plone 2.1.2
These instructions presume you have a fairly clean 2000 or XP install, that if you have other webservers running you'll change their or Plone's port 80 default to avoid conflicts, and that if you have potentially conflicting software already installed (Python 2.3, other versions of mapscript,etc) hanging around, you'll be extra careful with your registry and system variable edits, and will ensure products required here are installed to the correct python location.
If you have issues that you think these instructions don't cover, please
comment to the mailing list, or on #zco
-Josh Livni
1: Download these win32 installers
Zope
[currently 2.86]
FWTools [currently
1.0.0b2]
PCL
[currently .1.0.0]
elementtree [currently
1.26]
2: Download these things too:
Plone
2.1 [the tarball, not the win32 installer]
PrimaGIS and ZCO
proj.dll
simplejson
3: Optional: Get latest ZCO and PrimaGIS via SVN
- Download and install svn for
windows
http://svn.gispython.org/gispy/PCL/trunk http://svn.gispython.org/zope/ZCO/trunk http://svn.gispython.org/zope/PrimaGIS/trunk http://svn.gispython.org/zope/GeoAwareObjects/trunk
4: Base Product Installation
- Install Zope, using the default settings
- Install FWTools
- Ensure your python 2.3 install path points to your Zope's python
2.35.
- One way to do this is save the following as a .reg file (eg zopepythonfix.reg).li>
- You must edit the following if you did not use the default Zope install, or used a version other than 2.8.6.
- Warning! This may completely screw up your python settings! Proceed at your own risk!
- Ready? Double-click or otherwise run the .reg file you saved
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Python] [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore] [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.3] [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.3\EESRestoreData] "InstallPath"="c:\\Program Files\\Zope-2.8.6-final\\bin" "PythonPath"="c:\\Program Files\\Zope-2.8.6-final\\bin;c:\\Program Files\\Zope-2.8.6-final\\bin\\DLLs;c:\\Program Files\\Zope-2.8.6-final\\bin\\Lib" [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.3\EESRestoreData\SubPaths] [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.3\InstallPath] @="c:\\Program Files\\Zope-2.8.6-final\\bin" [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.3\PythonPath] @="c:\\Program Files\\Zope-2.8.6-final\\bin;c:\\Program Files\\Zope-2.8.6-final\\bin\\DLLs;c:\\Program Files\\Zope-2.8.6-final\\bin\\Lib"
- Install Elementree - ensuring it noted your correct (zope) python
- Install PCL by running the two win32 executables in the .zip you downloaded
- copy proj.dll to C:\Program Files\Zope-2.8.6-final\bin\Lib\site-packages\cartography\referencing\transform
- Install simplejson
-
- If you don't work with .egg files, just copy the simplejson subfolder to C:\Program Files\Zope-2.8.6-final\bin\Lib\site-packages\
- Edit some environment variables:
* Right click 'my computer' -> properties -> advanced -> environment variables
* Modify the PATH setting to include c:\Program Files\FWTools1.0.0b2\bin by adding the directory after the last semicolon
* Add a PROJ_LIB variable with the value: c:\Program Files\FWTools1.0.0b2\proj_lib
* Add a PYTHONPATH variable with the value: c:\Program Files\FWTools1.0.0b2\pymod
* Add a GDAL_DATA variable with the value: c:\Program Files\FWTools1.0.0b2\data -
* Note: If you did not install zope as a default service, you will need to modify your runzope.bat to ensure your pythonpath includes the pymod folder as above. -
5. Test the base stuff works
- Open python (the plone python, that is, which you can do by going to C:\Program Files\Zope-2.8.6\bin\python and then type 'python'
o >>> import mapscript
o >>> import cartography
o >>> import ogr
o >>> import gdal- If these give you no errors, you are doing well so far. if they do, do not continue until fixing. (problems mean that chances are some environment variable didn't get set right. New to windows? See if rebooting helps.)
6. Plone & PrimaGIS installation- Copy the contents of the Plone tarball (about 30 folders) directly to
c:\Zope-Instance\Products
- Use 7-zip if you don't have a program to untar things
- Copy the ZCO and PrimaGIS folders you downloaded in steps 2 or 3 to c:\Zope-Instance\Products (ensure the folders are called just ZCO and PrimaGIS)
* If you are running the latest version (from svn), update your PCL install as well, by coping the cartography folder to you downloaded from svn to C:\Program Files\Zope-2.8.6-final\bin\Lib\site-packages\cartography
* Restart your Zope instance
* Check it all installed ok by going to your ZMI (default is localhost:8080/manage) -> Control Panel -> Products and ensuring ZCO is there. If it's not, maybe your log file will point you in the right direction (zope-instance\logs\event.log)
* In the ZMI go to Plone -> portal_quickinstaller and install PrimaGIS
7. Have fun
* Some nice instructions on setting up a map and zco datastore can be found here [primagis.fi]
* You can also take advantage of the really nice createPrimaGISDemo.py . Just follow the instructions in that file (PrimaGIS\skins\primagis)
* Check primagis.fi for information on the mailing list which, and #zco for insta-help.