Commit 3778c573 authored by Sandro Tosi's avatar Sandro Tosi

Import basemap_1.1.0+dfsg.orig.tar.gz

parent d6a103d5
.project
build
#########################################
# Editor temporary/working/backup files #
.#*
[#]*#
*~
*$
*.bak
.project
.pydevproject
# Compiled source #
###################
*.a
*.com
*.class
*.dll
*.exe
*.o
*.py[ocd]
*.so
# Python files #
################
# setup.py working directory
build
# sphinx build directory
doc/_build
# setup.py dist directory
dist
# Egg metadata
*.egg-info
# tox testing tool
.tox
# OS generated files #
######################
.gdb_history
.DS_Store?
ehthumbs.db
Icon?
Thumbs.db
# Things specific to this project #
###################################
nad2bin
examples/*.png
*.pickle
# output of nad2bin
lib/mpl_toolkits/basemap/data/FL
lib/mpl_toolkits/basemap/data/MD
lib/mpl_toolkits/basemap/data/TN
lib/mpl_toolkits/basemap/data/WI
lib/mpl_toolkits/basemap/data/WO
lib/mpl_toolkits/basemap/data/alaska
lib/mpl_toolkits/basemap/data/conus
lib/mpl_toolkits/basemap/data/hawaii
lib/mpl_toolkits/basemap/data/null
lib/mpl_toolkits/basemap/data/prvi
lib/mpl_toolkits/basemap/data/stgeorge
lib/mpl_toolkits/basemap/data/stlrnc
lib/mpl_toolkits/basemap/data/stpaul
# Documentation generated files #
#################################
doc/examples
doc/_templates/gallery.html
doc/users/installing.rst
doc/_static/matplotlibrc
sudo: false
env:
global:
- NUMPY=numpy
- MPL=matplotlib
- PYPROJ=pyproj
- TEST_ARGS=--no-pep8
- BUILD_LIBGEOS=false
# install apt binary packages
addons:
apt:
packages:
- libgeos-3.3.8
# matplotlib requirements
- libpng12-dev
- libfreetype6-dev
# helpers utilities
- autotools-dev
- wget
language: python
cache:
directories:
# cache for wheels generated by pip
- $HOME/.cache/pip
# cache for libgeos library binaries
- $HOME/.libgeos
# matrix generates 6 test cases
matrix:
include:
# "minimum requirements" environments
# test the bare minimum versions
# compiles internal libgeos
# Notes:
# numpy 1.7.0 is the first version that works out of the box for Python 2.6 and 3.3
# numpy 1.5.1 is the earliest version to compile and *might* be able to work on Python 2.6,
# if two unit tests are skipped due to numpy.copy(a,order) not having 'order' parameter
# 1.6.0-1.6.2 works out of the box for Python 2.6
# matplotlib 1.2.0 was found to be the earliest version that installs
- python: 2.6
env:
- NUMPY=numpy==1.7.0
- MPL=matplotlib==1.2.0
- BUILD_LIBGEOS=internal
# "middle of the road" environment
# use prepackaged binaries
# if no prepackaged binary available, use a previous stable version
- python: 3.4
env:
- MPL=matplotlib==1.4.3
- NUMPY=numpy==1.9.3
- BUILD_LIBGEOS=internal
# "latest and greatest" stable environments
# this uses the current stable versions
# pip installs latest stable versions automatically
- python: 2.7
env:
- BUILD_LIBGEOS=3.5.1
- python: 3.5
env:
- BUILD_LIBGEOS=3.5.1
- python: 3.6
env:
- BUILD_LIBGEOS=3.6.1
# "current development" environment
# this test is diagnostic for development versions and is not required to pass
- python: "nightly"
env:
# these are python packages so prepend "git+" to git URL
- NUMPY=git+https://github.com/numpy/numpy.git
- MPL=git+https://github.com/matplotlib/matplotlib.git
- PYPROJ=git+https://github.com/jswhit/pyproj.git
# C lib, git URL only
- BUILD_LIBGEOS=https://github.com/libgeos/libgeos.git
# or download latest stable
# - BUILD_LIBGEOS=3.5.0
allow_failures:
- python: "nightly"
# before_install:
# Install into our own pristine virtualenv
# - virtualenv --python=python venv
# - source venv/bin/activate
install:
# Upgrade pip and setuptools. Install wheel.
- pip install --upgrade pip
- pip install --upgrade setuptools
- pip install wheel
# the development version of numpy requires Cython
- if [[ $TRAVIS_PYTHON_VERSION == 'nightly' ]]; then pip install --install-option="--no-cython-compile" Cython; fi
- pip install --upgrade $NUMPY
- pip install $MPL
- pip install $PYPROJ
- pip install -r requirements.txt
# extra requirements to support Python 2.6
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r .requirements-2.6.txt; fi
- |
# Is libgeos suppose to be built?
if [[ $BUILD_LIBGEOS != 'false' ]]; then
export GEOS_DIR=$HOME/.libgeos/${BUILD_LIBGEOS}/
# Does this path (for libgeos binaries) not exist in cache?
if [[ ! -d "$GEOS_DIR" ]] ; then
# Download and Compile libgeos
if [[ $BUILD_LIBGEOS == 'internal' ]]; then
echo 'Building internal libgeos'
cd geos-3.3.3
# Does this string contain a "git" substring?
elif [[ $BUILD_LIBGEOS == *"git"* ]]; then
echo 'Using git to download libgeos development'
git clone ${BUILD_LIBGEOS}
cd libgeos
./autogen.sh
# do NOT cache libgeos git
export GEOS_DIR=$HOME/dont-cache-me/
else
echo 'Downloading and building external libgeos'
wget https://github.com/libgeos/libgeos/archive/${BUILD_LIBGEOS}.tar.gz
tar zxf ${BUILD_LIBGEOS}.tar.gz
cd geos-${BUILD_LIBGEOS}
./autogen.sh
fi
./configure --prefix=$GEOS_DIR
make; make install
cd ..
fi
fi
# - pip install pep8
- pip install .
script:
- python lib/mpl_toolkits/basemap/test.py --verbose
This diff is collapsed.
All source, data files and other contents of the PROJ.4 package are
available under the following terms. Note that the PROJ 4.3 and earlier
was "public domain" as is common with US government work, but apparently
this is not a well defined legal term in many countries. I am placing
everything under the following MIT style license because I believe it is
effectively the same as public domain, allowing anyone to use the code as
they wish, including making proprietary derivatives.
Though I have put my own name as copyright holder, I don't mean to imply
I did the work. Essentially all work was done by Gerald Evenden.
--------------
Copyright (c) 2000, Frank Warmerdam
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
pyshp is released under the MIT license, which can be found at:
http://www.opensource.org/licenses/mit-license.php
Metadata-Version: 1.1
Metadata-Version: 1.0
Name: basemap
Version: 1.0.7
Version: 20050130
Summary: Plot data on map projections with matplotlib
Home-page: http://matplotlib.sourceforge.net/toolkits.html
Home-page: http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/python/basemap/
Author: Jeff Whitaker
Author-email: jeffrey.s.whitaker@noaa.gov
License: OSI Approved
Download-URL: http://sourceforge.net/projects/matplotlib
Description:
An add-on toolkit for matplotlib that lets you plot data
on map projections with coastlines, lakes, rivers and political boundaries.
See http://www.scipy.org/wikis/topical_software/Maps for an
example of what it can do.
Keywords: python,plotting,plots,graphs,charts,GIS,mapping,map projections,maps
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: OS Independent
License: UNKNOWN
Download-URL: http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/python/basemap/basemap-20050130.tar.gz
Description: UNKNOWN
Platform: UNKNOWN
**Descripton**
#Basemap
basemap - plot on map projections (with coastlines and political boundaries)
Plot on map projections (with coastlines and political boundaries)
using matplotlib.
**Requirements**
##Requirements
python 2.5 (or higher)
* Python 2.6 (or higher)
matplotlib
* matplotlib
numpy
* numpy
The GEOS (Geometry Engine - Open Source) library (version 3.1.1 or higher).
Source code is included in the geos-3.3.3 directory.
* [pyproj](https://github.com/jswhit/pyproj)
* [pyshp](https://github.com/GeospatialPython/pyshp)
PIL (http://pythonware.com/products/pil) is optional (only
needed for Basemap warpimage and bluemarble methods).
* The GEOS (Geometry Engine - Open Source) library (version 3.1.1 or higher).
Source code is included in the geos-3.3.3 directory.
On linux, if your python was installed via a package management system, make
* On linux, if your python was installed via a package management system, make
sure the corresponding "python-dev" package is also installed. Otherwise, you
may not have the python header (Python.h), which is required to build python
C extensions.
**Copyright**
###Optional
* [OWSLib](https://github.com/geopython/OWSLib) (optional) It is needed
for the BaseMap.wmsimage function.
source code from proj.4 (http://proj.maptools.org) is included in the
'src' directory under the terms given in LICENSE_proj4.
* [Pillow](https://python-pillow.github.io/) (optional) It is
needed for Basemap warpimage, bluemarble, shadedrelief, and etop methods.
PIL should work on Python 2.x. Pillow is a maintained fork of PIL.
source code from geographiclib (http://pypi.python.org/pypi/geographiclib)
is included in the 'lib/mpl_toolkits/basemap' directory under the terms
given in LICENSE_geographiclib.
##Copyright
source code for the GEOS library is
included in the 'geos-3.3.3' directory under the terms given in
LICENSE_geos.
shapefile.py from pyshp.googlecode.com is included under the terms given
in LICENSE_pyshp.
the land-sea mask, coastline, lake, river and political boundary data are extracted
from datasets provided with the Generic Mapping Tools
(http://gmt.soest.hawaii.edu)
from datasets provided with the [Generic Mapping Tools (GMT)](http://gmt.soest.hawaii.edu)
and are included under the terms given in LICENSE_data.
Everything else (including src/_proj.pyx,,
src/_proj.c, src/_geos.c, and src/_geos.pyx):
Everything else (including src/_geos.c, and src/_geos.pyx):
copyright (c) 2011 by Jeffrey Whitaker.
......@@ -61,7 +59,7 @@ USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
**Documentation**
##Documentation
see http://matplotlib.github.com/basemap/
......@@ -70,64 +68,42 @@ 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.
**Install**
##Install
0) Install pre-requisite python modules numpy and matplotlib.
0. Install pre-requisite python modules numpy and matplotlib.
1) Then download basemap-X.Y.Z.tar.gz (approx 100 mb) from
the sourceforge download site, unpack and cd to basemap-X.Y.Z.
1. Then download basemap-X.Y.Z.tar.gz (approx 100 mb) from
the [GitHub Releases](https://github.com/matplotlib/basemap/releases) page, unpack and cd to basemap-X.Y.Z.
2) Install the GEOS library. If you already have it on your
2. Install the GEOS library. If you already have it on your
system, just set the environment variable GEOS_DIR to point to the location
of libgeos_c and geos_c.h (if libgeos_c is in /usr/local/lib and
geos_c.h is in /usr/local/include, set GEOS_DIR to /usr/local).
Then go to step (3). If you don't have it, you can build it from
the source code included with basemap by following these steps:
> cd geos-3.3.3
> export GEOS_DIR=<where you want the libs and headers to go>
A reasonable choice on a Unix-like system is /usr/local, or
if you don't have permission to write there, your home directory.
> ./configure --prefix=$GEOS_DIR
> make; make install
```
> cd geos-3.3.3
> export GEOS_DIR=<where you want the libs and headers to go>
A reasonable choice on a Unix-like system is /usr/local, or
if you don't have permission to write there, your home directory.
> ./configure --prefix=$GEOS_DIR
> make; make install
```
3) cd back to the top level basemap directory (basemap-X.Y.Z) and
3. cd back to the top level basemap directory (basemap-X.Y.Z) and
run the usual 'python setup.py install'. Check your installation
by running "from mpl_toolkits.basemap import Basemap" at the python
prompt.
4) To test, cd to the examples directory and run 'python simpletest.py'.
4. To test, cd to the examples directory and run 'python simpletest.py'.
To run all the examples (except those that have extra dependencies
or require an internet connection), execute 'python run_all.py'.
**Contact**
Jeff Whitaker <jeffrey.s.whitaker@noaa.gov>
**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
Chris Murphy
Pierre Gerard-Marchant
Christoph Gohlke
Eric Bruning
Stephane Raynaud
Tom Loredo
Patrick Marsh
Phil Elson
for valuable contributions.
##Contact
Ben Root <ben.v.root@gmail.com>
##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.
......@@ -42,7 +42,7 @@ master_doc = 'index'
# General substitutions.
project = 'Basemap Matplotlib Toolkit'
copyright = '2011, Jeffrey Whitaker'
copyright = '2011, Jeffrey Whitaker; 2016 The matplotlib development team'
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
......
Welcome to the Matplotlib Basemap Toolkit documentation!
========================================================
Welcome to the Matplotlib Basemap Toolkit documentation
=======================================================
.. toctree::
:maxdepth: 2
......
backend : Agg
......@@ -8,4 +8,3 @@ m = Basemap(width=12000000,height=9000000,projection='lcc',
# lakes=True means plot inland lakes with ocean color.
m.drawlsmask(land_color='coral',ocean_color='aqua',lakes=True)
plt.show()
plt.show()
......@@ -11,7 +11,7 @@ ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
# plot just upper right quadrant (corners determined from global map).
# keywords llcrnrx,llcrnry,urcrnrx,urcrnry used to define the lower
# left and upper right corners in map projection coordinates.
# llcrnrlat,llcrnrlon,ucrnrlon,urcrnrlat could be used to define
# llcrnrlat,llcrnrlon,urcrnrlon,urcrnrlat could be used to define
# lat/lon values of corners - but this won't work in cases such as this
# where one of the corners does not lie on the earth.
m = Basemap(projection='geos',lon_0=lon_0,resolution='l',\
......
......@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
# lat_1 is first standard parallel.
# lat_2 is second standard parallel (defaults to lat_1).
# lon_0,lat_0 is central point.
# rsphere=(6378137.00,6356752.3142) specifies WGS4 ellipsoid
# rsphere=(6378137.00,6356752.3142) specifies WGS84 ellipsoid
# area_thresh=1000 means don't plot coastline features less
# than 1000 km^2 in area.
m = Basemap(width=12000000,height=9000000,
......
......@@ -14,7 +14,7 @@ ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
# plot just upper right quadrant (corners determined from global map).
# keywords llcrnrx,llcrnry,urcrnrx,urcrnry used to define the lower
# left and upper right corners in map projection coordinates.
# llcrnrlat,llcrnrlon,ucrnrlon,urcrnrlat could be used to define
# llcrnrlat,llcrnrlon,urcrnrlon,urcrnrlat could be used to define
# lat/lon values of corners - but this won't work in cases such as this
# where one of the corners does not lie on the earth.
m = Basemap(projection='nsper',satellite_height=h*1000.,\
......
......@@ -11,7 +11,7 @@ ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
# plot just upper right quadrant (corners determined from global map).
# keywords llcrnrx,llcrnry,urcrnrx,urcrnry used to define the lower
# left and upper right corners in map projection coordinates.
# llcrnrlat,llcrnrlon,ucrnrlon,urcrnrlat could be used to define
# llcrnrlat,llcrnrlon,urcrnrlon,urcrnrlat could be used to define
# lat/lon values of corners - but this won't work in cases such as this
# where one of the corners does not lie on the earth.
m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution='l',\
......
......@@ -3,8 +3,8 @@
Drawing a Map Background
========================
Basemap includes the
`GSSH <http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html>`_
Basemap includes the GSSH (now
`GSHHG <https://www.soest.hawaii.edu/pwessel/gshhg/>`_)
coastline dataset, as well as datasets for rivers, state and
country boundaries from
`GMT <http://gmt.soest.hawaii.edu>`_.
......
......@@ -21,7 +21,9 @@ Python 2.4 (or later, including Python 3)
numpy 1.2.1 (or later)
array support for python (`download <http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103>`__)
**Required libraries that ship with basemap**
`PROJ4 <https://trac.osgeo.org/proj/>`__ Cartographic Projections Library.
**Required library that ships with basemap**
`GEOS <http://trac.osgeo.org/geos/>`__ (Geometry Engine - Open Source) library 3.1.1 or later.
Source code is included in the geos-3.3.3 directory.
......@@ -29,20 +31,17 @@ numpy 1.2.1 (or later)
from basemap (see build instructions below).
Included in Windows binary installers.
`PROJ4 <http://trac.osgeo.org/proj/>`__ Cartographic Projections Library.
Patched version automatically built into basemap.
**Optional libraries**
PIL
Python Imaging Library (`download <http://www.pythonware.com/products/pil/>`__),
Pillow
Python Imaging Library (`download <https://python-pillow.org/>`__),
only needed for :func:`~mpl_toolkits.basemap.Basemap.bluemarble`, :func:`~mpl_toolkits.basemap.Basemap.etopo`, :func:`~mpl_toolkits.basemap.Basemap.shadedrelief` and :func:`~mpl_toolkits.basemap.Basemap.warpimage` instance methods.
Installation
============
Download either Windows binary installers or source tarballs
`here <http://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/>`__.
`here <https://github.com/matplotlib/basemap/releases/>`__.
To install from the source, follow these steps:
......
......@@ -21,14 +21,30 @@ datasets (from `Generic Mapping Tools <http://gmt.soest.hawaii.edu/>`_)
are provided, along with methods for plotting them. The `GEOS library
<http://geos.refractions.net>`_ is used internally to clip the coastline and polticial boundary features to the desired map projection region.
Basemap provides facilities for reading `shapefiles
<http://en.wikipedia.org/wiki/Shapefile>`_.
Basemap is geared toward the needs of earth scientists, particular
oceanographers and meteorologists. I originally wrote Basemap to help in my
research (climate and weather forecasting), since at the time
Basemap is geared toward the needs of earth scientists, particularly
oceanographers and meteorologists. Jeff Whitaker originally wrote Basemap
to help in his research (climate and weather forecasting), since at the time
`CDAT <http://www-pcmdi.llnl.gov/software/cdat/support/vcs/vcs.html>`_ was
the only other tool in python for plotting data on map projections. Over
the years, the capabilities of Basemap have evolved as scientists in other
disciplines (such as biology, geology and geophysics) requested and
contributed new features.
contributed new features.
Cartopy, New Management, and EoL Announcement
=============================================
Starting in 2016, Basemap came under new management. The
`Cartopy project <http://scitools.org.uk/cartopy/>`_ will replace
Basemap, but it hasn't yet implemented all of Basemap's features.
All new software development should try to use Cartopy whenever possible,
and existing software should start the process of switching over to use
Cartopy. All maintenance and development efforts should be focused on
Cartopy.
Ben Root has volunteered to take over maintenance of Basemap until 2020.
Pull requests will be reviewed, and bugs will be fixed. Also, the
maintenance will ensure compatibility with packages like NumPy and Matplotlib.
New features will be accepted, but we stress that new development efforts
should be focused on Cartopy. When Python 2.7 is officially EoL'ed in 2020,
a release of Basemap will be made and support from Ben Root will end.
......@@ -23,8 +23,9 @@ __init__.py module.
from numpy import *
import matplotlib.pyplot as pl
from matplotlib.pyplot import *
from mpl_toolkits.basemap import Basemap, pyproj
from mpl_toolkits.basemap.pyproj import Geod
from mpl_toolkits.basemap import Basemap
import pyproj
from pyproj import Geod
__all__ = ['AllSkyMap']
......
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
import sys
def get_input(prompt):
if sys.hexversion > 0x03000000:
return input(prompt)
else:
return raw_input(prompt)
# create Basemap instance for Near-Sided Perspective (satellite view) projection.
lon_0 = float(get_input('enter reference longitude (lon_0):'))