Skip to content

Layer Workflow Step by step for Windows

tucotuco edited this page Sep 12, 2011 · 5 revisions

Install Git

  1. Go to http://code.google.com/p/msysgit/downloads/list?can=3
  2. Download the first program listed (“Full installer for official Git for Windows”)
  3. Run the .exe file and follow the instructions

Clone MOL repository

  1. Open Git GUI
  2. Select Clone Existing Repository
  3. Enter https://github.com/andrewxhill/MOL.git for source location
  4. Enter C:\MOL for target directory
  5. Select Full Copy
  6. Click Clone

Install Google App Engine

  1. http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Python
  2. Download the version for Windows
  3. Run the .msi file and follow the instructions

Configure Google App Engine

  1. Note: must clone the MOL repository using Git before this step
  2. Open Google App Engine Launcher
  3. Click File Create New Application
  4. Application Name: mol-lab
  5. Parent Directory: C:\MOL\app
  6. Port: 8080

Install Python 2.6 or higher

  1. Go to http://www.python.org/download/releases/2.7.2/ for the latest release of Python (as of June 2011)
  2. Download the Windows x86 MSI Installer (2.7.2)
  3. Run the .msi and follow the instructions

Configure Environment Variables to find python.exe

  1. Right-click on My Computer
  2. Select Advanced system settings
  3. Select Environment Variables
  4. Under System Variables, select Path and click Edit
  5. In Variable Value add C:\Python27 (using ; to separate from other values already present), or the path to where Python is installed
  6. Click OK, OK, OK This will allow the computer to find python.exe when typing python in the command prompt. Note: If you have several versions of Python, whichever Value is first in the Variable Value of System Path will be the version that is called.

Install the YAML site package

  1. Go to http://pyyaml.org/wiki/PyYAML
  2. Download the appropriate installer for your version of Python
  3. Run the .exe file and follow the instructions

Install the simplejson site package

  1. Go to http://pypi.python.org/pypi/simplejson/
  2. Download the archive file
  3. Unzip the archive file
  4. Open the command prompt
  5. Change the directory (cd) to the folder you just unzipped (i.e. C:\Users\Cody\Downloads\simplejson-2.2.1)
  6. Type python setup.py install
  7. You can now delete the unzipped folder you downloaded

Install the GDAL site package

  1. Go to http://www.gisinternals.com/sdk/
  2. Select the appropriate version (latest stable version compiled daily) for Win32
  3. Download the Generic installer for the GDAL core components
  4. Download the Installer for the GDAL python bindings for the appropriate version of python
  5. Run the .exe file for core components and follow the instructions
  6. Run the .exe for the python bindings and follow the instructions

Configure Environment Variables for GDAL

  1. Right-click on My Computer
  2. Select Advanced system settings
  3. Select Environment Variables
  4. Under System Variables, select Path and click Edit
  5. In Variable Value add C:\Program Files (x86)\GDAL (using ; to separate from other values already present), or wherever the GDAL package is installed
  6. Click OK, OK, OK

Test YAML, simplejson, and GDAL

  1. Open the command prompt
  2. Type python
>>>import YAML
>>>import simplejson
>>>import gdal
>>>exit()

If any of the import statements gives you an error message, the corresponding site package did not install correctly.

See Help for loader.py

  1. Open the command prompt
  2. Change directory to C:\MOL\workflow\mol-data
  3. Type python loader.py –help

Run loader.py

  1. Open Google App Engine Launcher
  2. Select the application mol-lab and click Run
  3. Open the command prompt
  4. Change directory to C:\MOL\workflow\mol-data
  5. Type python loader.py --url=http://localhost:8080/_ah/remote_api --config_file=bulkload.yaml –V
  6. Hit Enter when prompted for Email:

Test that the data uploaded correctly

  1. Open your browser
  2. Go to http://localhost:8080/_ah/admin/datastore
  3. Select the Entity type you want to look at and click on the List Entities button to see them.

Note: Google App Engine must still be running Stop Google App Engine when you are done.

Clone this wiki locally