These instructions were originally taken from Kari Hoijarvi's site at http://wiki.esipfed.org/index.php/WCS_Wrapper_Installation_WindowsOP and modified for this particular installation. The modification for this installation are for a Windows 2008 Server and mostly comprise of stripping out comments for some the steps, and using a direct link for the file downloads. If you require any deviations from this installation, then refer to the original instructions.
WCS Wrapper Installation WindowsOP
1. Installation on a Windows 2008 Server:
2. Get Python
3. Get WCS Wrapper
Create C:\OWS directory.
Download win32-ows-1.2.3.zip from http://sourceforge.net/projects/aq-ogc-services/files_beta/.
Unzip it/both into your installation folder C:\OWS. You can install to other folders, this is just used as an example.
You will to have directories C:\OWS\datafed and C:\OWS\web
4. 3rd Party Components
Download 3rd party components from http://sourceforge.net/projects/aq-ogc-services/files/win32-3rdparty-1.2.0.zip/download.
Zip file contains the following:
Installing: all the files are in the 3rd party bundle, you don't need to go to web during installation.
5. Get NetCDF
6. Get WCS Wrapper
Download http://datafed.net/ows/datafed_ows.zip. Unzip it into your installation folder, let's use C:\OWS as an example.
You will to have directories C:\OWS\datafed and C:\OWS\web. The folder datafed contains datafed package, which contains tools for ISO 8601 time parsing and python-NetCDF bridge. Web is the WCS framework.
Make sure that C:\OWS is in your PYTHONPATH variable. Create it via Control Panel -> System -> Advanced -> Environment Variables. Run command prompt, start / run, "cmd.exe". Type "SET PYTHONPATH". If you see PYTHONPATH=C:\OWS you're OK
Change Directory to C:\OWS\web folder and type python ows.py. You have now your server running, listening port 8080. You can pass the port as parameter. python ows.py 80 listens the standard port 80.
7. Creating Metadata
Download and save the attached files (sd07.ncml and compile.py) to the directory where they will be ran from.
The Cube script consist of two parts: first sd07.ncml, NetCDF markup language file, that is used to create the big cube. It describes dimensions, variables and attributes. The compile.py is the script, that uses sd07.ncml and appends 48 last hours to the big cube, slice by slice. You must remove the slice .nc files before you run
Then run the owsadmin.py script for wcs_cap and wcs_desc like the following:
Replace localhost with your domain name or your raw ip address like 22.214.171.124, and port -p 8081 with the port you want to use. Default is the standard -p 80, but that is not always possible, since you might have another webserver in your machine.
They will create files C:\OWS\web\static\northropgrumman\wcs_1.1.0_capabilities.xml and C:\OWS\web\static\northropgrumman\wcs_1.1.0_desc_NGC_CALPuff.xml. The capabilities file contains all the coverages that this provider has, and each coverage gets its own desc file.
About everything in the compile script is hardcoded, it's only 56 lines so you should be able to modify it to create any kind of cubes you want. The python API follows very closely the NetCDF C API.
8. Index.html Pages
The server is at C:\OWS\web\static\index.html, which will be displayed from url http://localhost:8080/ or http://localhost . Every provider should have a index.html like C:\OWS\web\static\testprovider\index.html which will be displayed from http://localhost:8080/testprovider or http://localhost/testprovider . If you modify the default index.html, make sure not to overwrite it next time you upgrade the WCS Wrapper package. Keep the main copy elsewhere and copy it back.
python C:\OWS\web\owsadmin.py unix_nl "C:\OWS\web\static\northropgrumman\index.html"
Use your html editing tool support if possible.
9. Running in the background
This executable is meant to be a test server for developers. Therefore it does not support running as a service. But you can run any command line program in the background by using one of the following options: