####So far the scripts include:
- shpPopulate.py: used for loading a large quantity of shapefiles into a PostGIS/PostgreSQL database.
- db.py: some scripts for running queries and retrieving gis data
- sql.py: scripts for composing specific sql queries.
- mayascripts.py: a set of functions used in Autodesk Maya to retrieve and render animations of gis data based on SQL queries
- Install a good text editor or IDE
- Get a GitHub account.
- Install Git and set it up.
The software for local code is a set of Python modules. These modules use other tools to manage gis data and build 3d models. Here is an overview of the steps:
- Install the database and GIS tools.
- Make sure that the GIS tools can be found by Python
- Install the code libraries.
After that, you can begin loading and exporting data.
-
Install PostgreSQL (9.0.4) (when it asks, just tell it to listen on the defalt port)
download link Select the Win x86-32 version. When it asks, just tell it to listen on the default port. After the installation is finished, it will open StackBuilder, which you can use to install PostGIS.
-
Install PostGIS
In StackBuilder, install PostGIS (listed under 'Spatial Extensions').
-
Install OSGeo4W (Use the Express Desktop Install)
download link During Installation, select the 'Express Desktop Install'.
-
Install Python
download link Select the 'Windows x86 MSI 2.6.6' version.
-
Make sure that the PostgreSQL/bin folder (where PostgreSQL keeps it's scripts) is on the PATH.
There are two ways to do this. In the start menu, type 'env' and select 'Edit System Environmental Variables'
or go to Control Panel and find 'Edit System Environmental Variables' Scroll down the list of variables, and find the one labeled 'Path' Edit 'Path' by copying and pasting its contents into a text document. At the end of path, add the folder names for:- the PostgreSQL/bin folder
- the Python folder
- the Python/Scripts folder
- the OSGeo4W folder that contains
ogr2ogr
andogrinfo
-
Install setuptools download link (setuptools-0.6c11.win32-py2.6.exe)
-
Install pip.
Open 'cmd' by right-clicking on it and selecting 'Run As Administrator'. Enter the following commands:
curl -O https://github.com/pypa/pip/raw/master/contrib/get-pip.py python get-pip.py
-
Use the following commands, while still running 'cmd' as administrator, to install Python libraries.
pip install psycopg2
For using the Excel configuration utilities if you want to configure your shapefiles with a spreadsheet.
pip install xlwt pip install xlrd
And if you want to use these tools for 3d geometry.
pip install numpy pip install scipy