Giter VIP home page Giter VIP logo

basemap's Introduction

Basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib.

Requirements

Basic requirements are the following:

Optional requirements include:

  • OWSLib. It is needed for the Basemap.wmsimage function.

  • Pillow. It is needed for the methods Basemap.bluemarble, Basemap.etopo, Basemap.shadedrelief and Basemap.warpimage.

Installation

The basemap-data and basemap-data-hires packages are available in PyPI and can be installed with pip:

python -m pip install basemap-data
python -m pip install basemap-data-hires

Precompiled basemap binary wheels for Windows and GNU/Linux are also available in PyPI (architectures x86 and x64, Python 2.7 and 3.5+):

python -m pip install basemap

Otherwise, you will need to install basemap from source as follows:

  1. Install pre-requisite Python modules:

  2. Download the basemap source code and move to the packages/basemap folder:

    git clone --depth 1 https://github.com/matplotlib/basemap.git
    cd basemap/packages/basemap
  3. Build the GEOS library. You may use the helper provided in utils, i.e.

    export GEOS_DIR=<your desired location>
    python -c "import utils; utils.GeosLibrary('3.5.1').build(installdir='${GEOS_DIR}')"

    or you can link directly to the system library if it is already installed. GEOS_DIR must point to the GEOS installation prefix; e.g. if libgeos_c.so is located in /usr/lib and geos_c.h is located in /usr/include, then you must set GEOS_DIR to /usr.

  4. Build and install the basemap binary wheel:

    python -m pip install .

    On Linux, if your Python was installed through a package management system, make sure that you have the Python header Python.h required to build Cython extensions (e.g. on Debian-like systems, you should have the package python-dev installed).

  5. Check that the package installed correctly by executing:

    python -c "from mpl_toolkits.basemap import Basemap"

    You can also test the examples available in the examples folder.

License

The source code and data assets are under the following licenses:

For a full description, please visit the README and LICENSE files of each package.

Documentation

See https://matplotlib.github.io/basemap/

See scripts in examples directory for example usage.

Read the FAQ and/or email the matplotlib-users mailing list if you have problems or questions.

Contact

Ben Root [email protected]

Víctor Molina García (@molinav)

Thanks

Special thanks to John Hunter, Andrew Straw, Eric Firing, Rob Hetland, Scott Sinclair, Ivan Lima, Erik Andersen, Michael Hearne, Jesper Larsen, Ryan May, David Huard, Mauro Cavalcanti, Jonas Bluethgen, Chris Murphy, Pierre Gerard-Marchant, Christoph Gohlke, Eric Bruning, Stephane Raynaud, Tom Loredo, Patrick Marsh, Phil Elson, and Henry Hammond for valuable contributions.

Known bugs

The Basemap.fillcontinents method doesn't always do the right thing. Matplotlib always tries to fill the inside of a polygon. Under certain situations, what is the inside of a coastline polygon can be ambiguous, and the outside may be filled instead of the inside. A workaround is to change the map projection region slightly or mask the land areas with the Basemap.drawlsmask method instead of filling the coastline polygons (this is illustrated in the ortho_demo.py example).

basemap's People

Contributors

astraw avatar barronh avatar cgohlke avatar cmoad avatar dopplershift avatar dwesl avatar efiring avatar gauteh avatar guziy avatar heitorpb avatar hugovk avatar j08lue avatar jenshnielsen avatar joernu76 avatar joferkington avatar jswhit avatar megies avatar micahcochran avatar molinav avatar nbambruz avatar nparley avatar ocefpaf avatar pablo-benito avatar pandrey-fr avatar pelson avatar rwogburn avatar sandrotosi avatar takluyver avatar timhoffm avatar weathergod avatar

Watchers

 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.