Giter VIP home page Giter VIP logo

pyproj's Introduction

pyproj

Installation

  • clone github repo or download source release at http://python.org/pypi/pyproj.
    • If you clone the github repo, Cython is a dependency.
  • python setup.py build
  • python setup.py install (with sudo if necessary).

To use proj4 lib (and data files) that are already installed on the system, set PROJ_DIR environment variable to point to location of proj4 installation before running setup.py. If PROJ_DIR is not set, the bundled proj4 source code and data files are used.

Examples of how to set the PROJ_DIR environment variable:

  • Windows - C:\...> set PROJ_DIR=C:\OSGeo4W\
  • Linux/OS X on most shells- $ export PROJ_DIR=/lib/

Testing

nose2 is required to run some tests. There are two testing suites: doctests and unittests. Doctests are located in lib/pyproj/_init_.py. Unittests are located in unittest/.

To run all tests (add -v option to add verbose output):

    nose2 [-v]

To run only the doctest:

    python -c "import pyproj; pyproj.test()"

To run only the unittests:

    python unittest/test.py [-v]
OR:
    nose2 unittest/test.py [-v]

Code Coverage

nose2 will automatically produce coverage for python files. In order to get coverage for the Cython code there are a couple extra steps needed. Travis-CI should be set up to measure this automatically.

  • Download pyproj source.
  • Install Cython, and all other testing requirements
  pip install -r requirements-dev.txt
  • Add this line to top of _proj.pyx
  # cython: linetrace=True
  • Set the environment variable PYPROJ_FULL_COVERAGE to any value. This is only needed for installation. Most platforms $ export PYPROJ_FULL_COVERGAGE=1. Windows: C:...> set PYPROJ_FULL_COVERGAGE=1,

  • Install in editable/development mode (python setup.py uses the --inplace flag)

    • Using pip, use --upgrade flag if pyproj is already installed.
    pip install [--upgrade] --editable .
  • Using python setup.py (this isn't well tested)
    python setup.py build_ext --inplace
    python setup.py install

Documentation

Docs are at http://jswhit.github.io/pyproj.

Bugs/Questions

Report bugs/ask questions at https://github.com/jswhit/pyproj/issues.

pyproj's People

Contributors

chrisbarker-noaa avatar chrrrisw avatar dopplershift avatar georgeouzou avatar jdemaeyer avatar jdkloe avatar jswhit avatar mdunphy avatar micahcochran avatar mitkin avatar nickeubank avatar ocefpaf avatar reallyniceguy avatar zippy1981 avatar

Watchers

 avatar  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.