GithubHelp home page GithubHelp logo

scipy2013's Introduction

This repository contains materials for the tutorial Using Geospatial Data With Python to be held Jun 25, 2013, at the SciPy 2013 conference.

Required packages

  • pyproj python interface to PROJ.4 library
  • Basemap plot on map projections using matplotlib
  • gdal python bindings for Geospatial Data Abstraction Library (and OGR)
  • shapely pythonic library for geometric tasks
  • fiona pythonic interface to OGR data formats

Optional packages

  • Cartopy Advanced mapping interface for python
  • Descartes Create matplotlib Patch objects from Shapely geometries
  • geoJSON reference implementation of the Python geo interface
  • psycopg2 for connection to PostgreSQL/PostGIS database
  • SQLAlchemy Object Relational Model for SQL databases

Installation instructions

The standard scientific python stack is a prerequisite for this tutorial before installing the specific packages listed above. I recommend starting with a standard scientific python distribution such as Enthought Canopy or anaconda. All students for SciPy tutorials will have received a free license for Canopy for a limited period of time (also free for academic use, and anyone can use the free Canopy Express). Other package managers such as Linux distribution tools or homebrew for OS X will work for a starting point as well, though I have not tested these. On Windows you may be able to use Christoph Golke's binary packages.

Install the above packages via your standard package manager when possible. For packages not available in this way (or if you wish to use a different version than available), you may install directly with pip or easy_install. For example, to install Shapely, you may use:

pip install shapely

Finally, if all else fails, or you wish to be on the bleeding edge, you may install packages from source. For example:

git clone https://github.com/Toblerity/Shapely
cd Shapely
python setup.py install

will install the current development version of Shapely.

Serge Ray has shared his setup notes for OS X 10.8.4 and anaconda.

Known installation issues

  • Importing shapely in Canopy version 1.0.1 on OS X fails while loading the GEOS library, and throws an exception of the form "OSError: Could not find library c or load any of its variants". This can be fixed by upgrading to Canopy 1.0.3 (available soon) or worked around by setting the following environment variable:

    export DYLD_FALLBACK_LIBRARY_PATH=$(HOME)/lib:/usr/local/lib:/lib:/usr/lib
    
  • The GDAL 1.9.0 package in Canopy fails to find the PROJ.4 library for some operations. It should work for other use cases.

  • GDAL binary libraries may not be found even when they are installed, particularly when installing fiona. The fiona install process uses the command gdal-config --cflags to find header files. This should match your GDAL install location.

You may need to install GDAL on your system. A number of binaries are available, or you could use a package manager such as fink or apt-get, or build it from source.

  • Dependency errors installing psycopg2 in Canopy and EPD. This may be overcome by downloading the psycopg2 .egg file from the Enthought PyPI mirror and installing it manually with the egginst command, or with pip install psycopg2. Windows users can try this binary installer for psycopg2 which has been reported to work.

scipy2013's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.