diff --git a/INSTALL b/INSTALL index 1862b3a6e..31b7ab955 100644 --- a/INSTALL +++ b/INSTALL @@ -73,7 +73,7 @@ The recipes for these can be found at https://github.com/conda-forge/feedstocks. **pyshp** 1.1.4 or later (https://pypi.python.org/pypi/pyshp) Pure Python read/write support for ESRI Shapefile format. -**PROJ.4** 4.9.0 or later (http://proj4.org/) +**PROJ** 4.9.0 or later (https://proj4.org/) Cartographic Projections library. **six** 1.3.0 or later (https://pypi.python.org/pypi/six) diff --git a/lib/cartopy/_crs.pxd b/lib/cartopy/_crs.pxd index fab9ab427..d377b5702 100644 --- a/lib/cartopy/_crs.pxd +++ b/lib/cartopy/_crs.pxd @@ -22,7 +22,7 @@ cdef extern from "proj_api.h": cdef class CRS: """ - Defines a Coordinate Reference System using proj.4. + Defines a Coordinate Reference System using proj. """ diff --git a/lib/cartopy/_crs.pyx b/lib/cartopy/_crs.pyx index 1def57c6b..650750578 100644 --- a/lib/cartopy/_crs.pyx +++ b/lib/cartopy/_crs.pyx @@ -16,7 +16,7 @@ # along with cartopy. If not, see . """ -This module defines the core CRS class which can interface with Proj.4. +This module defines the core CRS class which can interface with Proj. The CRS class is the base-class for all projections defined in :mod:`cartopy.crs`. """ @@ -70,7 +70,7 @@ class Proj4Error(Exception): def __init__(self): cdef int status status = deref(pj_get_errno_ref()) - msg = 'Error from proj.4: {}'.format(pj_strerrno(status)) + msg = 'Error from proj: {}'.format(pj_strerrno(status)) self.status = status Exception.__init__(self, msg) @@ -88,9 +88,9 @@ class Globe(object): Parameters ---------- datum - Proj4 "datum" definition. Defaults to None. + Proj "datum" definition. Defaults to None. ellipse - Proj4 "ellps" definition. Defaults to 'WGS84'. + Proj "ellps" definition. Defaults to 'WGS84'. semimajor_axis Semimajor axis of the spheroid / ellipsoid. Defaults to None. semiminor_axis @@ -100,9 +100,9 @@ class Globe(object): inverse_flattening Inverse flattening of the ellipsoid. Defaults to None. towgs84 - Passed through to the Proj4 definition. Defaults to None. + Passed through to the Proj definition. Defaults to None. nadgrids - Passed through to the Proj4 definition. Defaults to None. + Passed through to the Proj definition. Defaults to None. """ self.datum = datum @@ -117,7 +117,7 @@ class Globe(object): def to_proj4_params(self): """ Create an OrderedDict of key value pairs which represents this globe - in terms of proj4 params. + in terms of proj params. """ proj4_params = (['datum', self.datum], ['ellps', self.ellipse], @@ -129,7 +129,7 @@ class Globe(object): cdef class CRS: """ - Define a Coordinate Reference System using proj.4. + Define a Coordinate Reference System using proj. """ def __cinit__(self): @@ -276,8 +276,8 @@ cdef class CRS: instance of :class:`CRS` that represents the coordinate system of ``x`` and ``y``. trap - Whether proj.4 errors for "latitude or longitude exceeded - limits" and "tolerance condition error" should be trapped. + Whether proj errors for "latitude or longitude exceeded limits" and + "tolerance condition error" should be trapped. Returns ------- @@ -376,7 +376,7 @@ cdef class CRS: else: result[:, 2] = z - # call proj.4. The result array is modified in place. This is only + # call proj. The result array is modified in place. This is only # safe if npts is not 0. if npts: status = pj_transform(src_crs.proj4, self.proj4, npts, 3, diff --git a/lib/cartopy/crs.py b/lib/cartopy/crs.py index f903438bd..153adad41 100644 --- a/lib/cartopy/crs.py +++ b/lib/cartopy/crs.py @@ -52,7 +52,7 @@ class RotatedGeodetic(CRS): Coordinates are measured in degrees. - The class uses proj4 to perform an ob_tran operation, using the + The class uses proj to perform an ob_tran operation, using the pole_longitude to set a lon_0 then performing two rotations based on pole_latitude and central_rotated_longitude. This is equivalent to setting the new pole to a location defined by @@ -994,7 +994,7 @@ def __init__(self, central_longitude=0.0, super(Mercator, self).__init__(proj4_params, globe=globe) - # In new proj.4, using exact limits will wrap-around, so subtract a + # In new proj, using exact limits will wrap-around, so subtract a # small epsilon: epsilon = 1e-10 minlon = -180 + central_longitude @@ -1276,7 +1276,7 @@ def __init__(self, central_longitude=0.0, globe=None): b = np.float(globe.semiminor_axis or a) if b != a or globe.ellipse is not None: - warnings.warn('The proj4 "mill" projection does not handle ' + warnings.warn('The proj "mill" projection does not handle ' 'elliptical globes.') proj4_params = [('proj', 'mill'), ('lon_0', central_longitude)] @@ -1298,7 +1298,7 @@ class RotatedPole(_CylindricalProjection): Coordinates are measured in projection metres. - The class uses proj4 to perform an ob_tran operation, using the + The class uses proj to perform an ob_tran operation, using the pole_longitude to set a lon_0 then performing two rotations based on pole_latitude and central_rotated_longitude. This is equivalent to setting the new pole to a location defined by @@ -1367,20 +1367,20 @@ def __init__(self, central_latitude=0.0, central_longitude=0.0, false_easting=0.0, false_northing=0.0, true_scale_latitude=None, scale_factor=None, globe=None): - # Warn when using Stereographic with proj4 < 5.0.0 due to + # Warn when using Stereographic with proj < 5.0.0 due to # incorrect transformation with lon_0=0 (see # https://github.com/OSGeo/proj.4/issues/194). if central_latitude == 0: if PROJ4_VERSION != (): if PROJ4_VERSION < (5, 0, 0): warnings.warn( - 'The Stereographic projection in Proj.4 older than ' + 'The Stereographic projection in Proj older than ' '5.0.0 incorrectly transforms points when ' 'central_latitude=0. Use this projection with ' 'caution.') else: warnings.warn( - 'Cannot determine Proj.4 version. The Stereographic ' + 'Cannot determine Proj version. The Stereographic ' 'projection may be unreliable and should be used with ' 'caution.') @@ -1476,7 +1476,7 @@ def __init__(self, central_longitude=0.0, central_latitude=0.0, b = np.float(self.globe.semiminor_axis or a) if b != a: - warnings.warn('The proj4 "ortho" projection does not appear to ' + warnings.warn('The proj "ortho" projection does not appear to ' 'handle elliptical globes.') # To stabilise the projection of geometries, we reduce the boundary by @@ -1509,7 +1509,7 @@ def __init__(self, proj4_params, central_longitude, globe=None): super(_WarpedRectangularProjection, self).__init__(proj4_params, globe=globe) - # In new proj.4, using exact limits will wrap-around, so subtract a + # In new proj, using exact limits will wrap-around, so subtract a # small epsilon: epsilon = 1.e-10 minlon = -180 + central_longitude @@ -1562,17 +1562,17 @@ def threshold(self): class Robinson(_WarpedRectangularProjection): def __init__(self, central_longitude=0, globe=None): - # Warn when using Robinson with proj4 4.8 due to discontinuity at + # Warn when using Robinson with proj 4.8 due to discontinuity at # 40 deg N introduced by incomplete fix to issue #113 (see # https://github.com/OSGeo/proj.4/issues/113). if PROJ4_VERSION != (): if (4, 8) <= PROJ4_VERSION < (4, 9): warnings.warn('The Robinson projection in the v4.8.x series ' - 'of Proj.4 contains a discontinuity at ' + 'of Proj contains a discontinuity at ' '40 deg latitude. Use this projection with ' 'caution.') else: - warnings.warn('Cannot determine Proj.4 version. The Robinson ' + warnings.warn('Cannot determine Proj version. The Robinson ' 'projection may be unreliable and should be used ' 'with caution.') @@ -1905,17 +1905,17 @@ def __init__(self, central_longitude=0.0, central_latitude=0.0, globe is created. """ - # Warn when using Azimuthal Equidistant with proj4 < 4.9.2 due to + # Warn when using Azimuthal Equidistant with proj < 4.9.2 due to # incorrect transformation past 90 deg distance (see # https://github.com/OSGeo/proj.4/issues/246). if PROJ4_VERSION != (): if PROJ4_VERSION < (4, 9, 2): - warnings.warn('The Azimuthal Equidistant projection in Proj.4 ' + warnings.warn('The Azimuthal Equidistant projection in Proj ' 'older than 4.9.2 incorrectly transforms points ' 'farther than 90 deg from the origin. Use this ' 'projection with caution.') else: - warnings.warn('Cannot determine Proj.4 version. The Azimuthal ' + warnings.warn('Cannot determine Proj version. The Azimuthal ' 'Equidistant projection may be unreliable and ' 'should be used with caution.') diff --git a/lib/cartopy/geodesic/_geodesic.pyx b/lib/cartopy/geodesic/_geodesic.pyx index 05114238c..f9dcb0824 100644 --- a/lib/cartopy/geodesic/_geodesic.pyx +++ b/lib/cartopy/geodesic/_geodesic.pyx @@ -16,7 +16,7 @@ # along with cartopy. If not, see . """ -This module defines the Geodesic class which can interface with the Proj.4. +This module defines the Geodesic class which can interface with the Proj geodesic functions. """ diff --git a/lib/cartopy/tests/crs/test_robinson.py b/lib/cartopy/tests/crs/test_robinson.py index ecf65cf83..891bf0e7d 100644 --- a/lib/cartopy/tests/crs/test_robinson.py +++ b/lib/cartopy/tests/crs/test_robinson.py @@ -1,4 +1,4 @@ -# (C) British Crown Copyright 2013 - 2017, Met Office +# (C) British Crown Copyright 2013 - 2018, Met Office # # This file is part of cartopy. # @@ -35,7 +35,7 @@ _CRS_PC = ccrs.PlateCarree() _CRS_ROB = ccrs.Robinson() -# Increase tolerance if using older proj.4 releases +# Increase tolerance if using older proj releases _TOL = -1 if ccrs.PROJ4_VERSION < (4, 9) else 7 diff --git a/lib/cartopy/tests/crs/test_stereographic.py b/lib/cartopy/tests/crs/test_stereographic.py index 3bfd49781..339491e05 100644 --- a/lib/cartopy/tests/crs/test_stereographic.py +++ b/lib/cartopy/tests/crs/test_stereographic.py @@ -60,7 +60,7 @@ def test_eccentric_globe(self): def test_true_scale(self): # The "true_scale_latitude" parameter only makes sense for # polar stereographic projections (#339 and #455). - # For now only the proj4 string creation is tested + # For now only the proj string creation is tested # See test_scale_factor for test on projection. globe = ccrs.Globe(ellipse='sphere') stereo = ccrs.NorthPolarStereo(true_scale_latitude=30, globe=globe) diff --git a/lib/cartopy/tests/mpl/test_mpl_integration.py b/lib/cartopy/tests/mpl/test_mpl_integration.py index b852e19a3..16d150fb5 100644 --- a/lib/cartopy/tests/mpl/test_mpl_integration.py +++ b/lib/cartopy/tests/mpl/test_mpl_integration.py @@ -172,9 +172,9 @@ def test_multiple_projections(): ] if ccrs.PROJ4_VERSION < (5, 0, 0): - # Produce the same sized image for old proj4, to avoid having to - # replace the image. If this figure is regenerated for both old and new - # proj4, then drop this condition. + # Produce the same sized image for old proj, to avoid having to replace + # the image. If this figure is regenerated for both old and new proj, + # then drop this condition. rows = 5 else: rows = np.ceil(len(projections) / 5) diff --git a/lib/cartopy/tests/test_crs.py b/lib/cartopy/tests/test_crs.py index 719c2be37..d03373601 100644 --- a/lib/cartopy/tests/test_crs.py +++ b/lib/cartopy/tests/test_crs.py @@ -118,7 +118,7 @@ def test_transform_points_nD(self): unrotated_lon = res[..., 0] unrotated_lat = res[..., 1] - # Solutions derived by proj4 direct. + # Solutions derived by proj direct. solx = np.array([[-16.42176094, -14.85892262, -11.90627520], [-16.71055023, -14.58434624, -11.68799988]]) soly = np.array([[46.00724251, 51.29188893, 52.59101488], @@ -138,7 +138,7 @@ def test_transform_points_1D(self): unrotated_lon = res[..., 0] unrotated_lat = res[..., 1] - # Solutions derived by proj4 direct. + # Solutions derived by proj direct. solx = np.array([-16.42176094, -14.85892262, -12.88946157, -10.35078336]) soly = np.array([46.00724251, 51.29188893, diff --git a/lib/cartopy/trace.pyx b/lib/cartopy/trace.pyx index 77726201a..f2f352040 100644 --- a/lib/cartopy/trace.pyx +++ b/lib/cartopy/trace.pyx @@ -16,10 +16,10 @@ # along with cartopy. If not, see . """ -This module pulls together _trace.cpp, proj.4, GEOS and _crs.pyx to implement a function -to project a LinearRing/LineString. In general, this should never be called manually, -instead leaving the processing to be done by the :class:`cartopy.crs.Projection` -subclasses. +This module pulls together _trace.cpp, proj, GEOS and _crs.pyx to implement a +function to project a LinearRing/LineString. In general, this should never be +called manually, instead leaving the processing to be done by the +:class:`cartopy.crs.Projection` subclasses. """ from libc.stdint cimport uintptr_t as ptr diff --git a/setup.py b/setup.py index 6e67d1daf..b0409ac6f 100644 --- a/setup.py +++ b/setup.py @@ -205,19 +205,19 @@ def _header_bad(self, path): geos_libraries.append(entry[2:]) -# Proj4 +# Proj def find_proj_version_by_program(conda=None): proj = find_executable('proj') if proj is None: print( - 'Proj4 %s must be installed.' % ( + 'Proj %s must be installed.' % ( '.'.join(str(v) for v in PROJ_MIN_VERSION), ), file=sys.stderr) exit(1) if conda is not None and conda not in proj: print( - 'Proj4 %s must be installed in Conda environment "%s".' % ( + 'Proj %s must be installed in Conda environment "%s".' % ( '.'.join(str(v) for v in PROJ_MIN_VERSION), conda), file=sys.stderr) exit(1) @@ -229,7 +229,7 @@ def find_proj_version_by_program(conda=None): proj_version = tuple(int(v.strip(b',')) for v in proj_version) except (OSError, IndexError, ValueError, subprocess.CalledProcessError): warnings.warn( - 'Unable to determine Proj4 version. Ensure you have %s or later ' + 'Unable to determine Proj version. Ensure you have %s or later ' 'installed, or installation may fail.' % ( '.'.join(str(v) for v in PROJ_MIN_VERSION), )) proj_version = (0, 0, 0) @@ -245,7 +245,7 @@ def find_proj_version_by_program(conda=None): proj_version = find_proj_version_by_program(conda) if proj_version < PROJ_MIN_VERSION: print( - 'Proj4 version %s is installed, but cartopy requires at least ' + 'Proj version %s is installed, but cartopy requires at least ' 'version %s.' % ('.'.join(str(v) for v in proj_version), '.'.join(str(v) for v in PROJ_MIN_VERSION)), file=sys.stderr) @@ -268,7 +268,7 @@ def find_proj_version_by_program(conda=None): proj_version = find_proj_version_by_program() if proj_version < PROJ_MIN_VERSION: print( - 'Proj4 version %s is installed, but cartopy requires at least ' + 'Proj version %s is installed, but cartopy requires at least ' 'version %s.' % ('.'.join(str(v) for v in proj_version), '.'.join(str(v) for v in PROJ_MIN_VERSION)), file=sys.stderr) @@ -280,7 +280,7 @@ def find_proj_version_by_program(conda=None): else: if proj_version < PROJ_MIN_VERSION: print( - 'Proj4 version %s is installed, but cartopy requires at least ' + 'Proj version %s is installed, but cartopy requires at least ' 'version %s.' % ('.'.join(str(v) for v in proj_version), '.'.join(str(v) for v in PROJ_MIN_VERSION)), file=sys.stderr) @@ -353,7 +353,7 @@ def get_config_var(name): long_description=description, long_description_content_type='text/markdown', license="LGPLv3", - keywords="cartography map transform projection proj.4 geos shapely " + keywords="cartography map transform projection proj proj.4 geos shapely " "shapefile", install_requires=install_requires, @@ -377,7 +377,7 @@ def get_config_var(name): ['io/srtm.npz']}, - # requires proj4 headers + # requires proj headers ext_modules=[ Extension( 'cartopy.trace', @@ -397,7 +397,7 @@ def get_config_var(name): library_dirs=[library_dir] + proj_library_dirs, **extra_extension_args ), - # Requires proj4 v4.9 + # Requires proj v4.9 Extension( 'cartopy.geodesic._geodesic', ['lib/cartopy/geodesic/_geodesic.pyx'],