[Git][debian-gis-team/python-pyproj][experimental] 11 commits: Revert "Update branch in gbp.conf & Vcs-Git URL."

Bas Couwenberg gitlab at salsa.debian.org
Sat Nov 2 06:21:16 GMT 2019



Bas Couwenberg pushed to branch experimental at Debian GIS Project / python-pyproj


Commits:
d0f0ca1e by Bas Couwenberg at 2019-09-21T04:25:55Z
Revert "Update branch in gbp.conf & Vcs-Git URL."

This reverts commit f694b1e72b93b2fa21269727626af9c85737fe8c.

- - - - -
8a50040c by Bas Couwenberg at 2019-09-21T04:26:24Z
New upstream version 2.4.0+ds
- - - - -
92ca16d6 by Bas Couwenberg at 2019-09-21T04:26:25Z
Update upstream source from tag 'upstream/2.4.0+ds'

Update to upstream version '2.4.0+ds'
with Debian dir f4757529e06f5afcd909b81adedd9e6065e477b1
- - - - -
a06057fe by Bas Couwenberg at 2019-09-21T04:26:38Z
New upstream release.

- - - - -
6c5ecb10 by Bas Couwenberg at 2019-09-21T04:27:26Z
Set distribution to unstable.

- - - - -
b41e8309 by Bas Couwenberg at 2019-09-30T17:54:46Z
Bump Standards-Version to 4.4.1, no changes.

- - - - -
cfa7dff8 by Bas Couwenberg at 2019-11-02T06:02:00Z
Update branch in gbp.conf & Vcs-Git URL.

- - - - -
6e0a13ed by Bas Couwenberg at 2019-11-02T06:02:23Z
New upstream version 2.4.1~rc0+ds
- - - - -
c34da36a by Bas Couwenberg at 2019-11-02T06:02:24Z
Update upstream source from tag 'upstream/2.4.1_rc0+ds'

Update to upstream version '2.4.1~rc0+ds'
with Debian dir 944d8951e5e137d922221ed572cb332be7489b2f
- - - - -
f22f4619 by Bas Couwenberg at 2019-11-02T06:03:01Z
New upstream release candidate.

- - - - -
586620dd by Bas Couwenberg at 2019-11-02T06:04:11Z
Set distribution to experimental.

- - - - -


19 changed files:

- .all-contributorsrc
- .travis.yml
- README.md
- appveyor.yml
- debian/changelog
- debian/control
- pyproj/__init__.py
- pyproj/_crs.pxd
- pyproj/_crs.pyx
- pyproj/cf1x8.py
- pyproj/crs.py
- pyproj/datadir.py
- pyproj/transformer.py
- setup.py
- test/test_crs.py
- test/test_crs_cf.py
- test/test_doctest_wrapper.py
- test/test_geod.py
- test/test_transformer.py


Changes:

=====================================
.all-contributorsrc
=====================================
@@ -266,7 +266,8 @@
       "profile": "https://evers.dev/",
       "contributions": [
         "question",
-        "ideas"
+        "ideas",
+        "doc"
       ]
     },
     {


=====================================
.travis.yml
=====================================
@@ -11,7 +11,7 @@ env:
   global: 
     - PROJ_BASE_DIR=$HOME/proj_install
     - CYTHON_COVERAGE=True
-    - PROJSOURCE=6.2.0
+    - PROJSOURCE=6.2.1
     # Following generated with
     - WHEELHOUSE_UPLOADER_USERNAME=travis-worker
     # Following generated by
@@ -26,18 +26,23 @@ matrix:
       os: osx
       env:
         - PYTHON=3.6.8
-        - PROJSOURCE=6.2.0
+        - PROJSOURCE=6.2.1
     - python: 3.5
       env:
-        - PROJSOURCE=6.2.0
+        - PROJSOURCE=6.2.1
     - python: 3.6
       env:
         - PROJSOURCE=6.2.0
+    - python: 3.6
+      env:
+        - PROJSOURCE=6.2.1
     - python: 3.7
-      dist: xenial
       env:
-        - PROJSOURCE=6.2.0
+        - PROJSOURCE=6.2.1
         - DOC=true
+    - python: 3.8
+      env:
+        - PROJSOURCE=6.2.1
     - python: "nightly"
       env:
         - PROJSOURCE=git


=====================================
README.md
=====================================
@@ -32,7 +32,8 @@ Python interface to [PROJ](http://proj.org) (cartographic projections and coordi
 Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
 
 <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
-<!-- prettier-ignore -->
+<!-- prettier-ignore-start -->
+<!-- markdownlint-disable -->
 <table>
   <tr>
     <td align="center"><a href="https://github.com/jswhit"><img src="https://avatars2.githubusercontent.com/u/579593?v=4" width="100px;" alt="Jeff Whitaker"/><br /><sub><b>Jeff Whitaker</b></sub></a><br /><a href="https://github.com/snowman2/pyproj/commits?author=jswhit" title="Documentation">πŸ“–</a> <a href="https://github.com/snowman2/pyproj/commits?author=jswhit" title="Tests">⚠️</a> <a href="https://github.com/snowman2/pyproj/commits?author=jswhit" title="Code">πŸ’»</a> <a href="#example-jswhit" title="Examples">πŸ’‘</a> <a href="#ideas-jswhit" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="#review-jswhit" title="Reviewed Pull Requests">πŸ‘€</a> <a href="#question-jswhit" title="Answering Questions">πŸ’¬</a> <a href="#maintenance-jswhit" title="Maintenance">🚧</a> <a href="#infra-jswhit" title="Infrastructure (Hosting, Build-Tools, etc)">πŸš‡</a></td>
@@ -65,13 +66,15 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
     <td align="center"><a href="http://lizards.opensuse.org/author/bmwiedemann/"><img src="https://avatars3.githubusercontent.com/u/637990?v=4" width="100px;" alt="Bernhard M. Wiedemann"/><br /><sub><b>Bernhard M. Wiedemann</b></sub></a><br /><a href="https://github.com/snowman2/pyproj/commits?author=bmwiedemann" title="Code">πŸ’»</a></td>
     <td align="center"><a href="https://github.com/ReallyNiceGuy"><img src="https://avatars0.githubusercontent.com/u/6545730?v=4" width="100px;" alt="Marco AurΓ©lio da Costa"/><br /><sub><b>Marco AurΓ©lio da Costa</b></sub></a><br /><a href="https://github.com/snowman2/pyproj/commits?author=ReallyNiceGuy" title="Code">πŸ’»</a></td>
     <td align="center"><a href="https://github.com/ChrisBarker-NOAA"><img src="https://avatars2.githubusercontent.com/u/916576?v=4" width="100px;" alt="Christopher H. Barker"/><br /><sub><b>Christopher H. Barker</b></sub></a><br /><a href="https://github.com/snowman2/pyproj/commits?author=ChrisBarker-NOAA" title="Code">πŸ’»</a></td>
-    <td align="center"><a href="https://evers.dev/"><img src="https://avatars3.githubusercontent.com/u/13132571?v=4" width="100px;" alt="Kristian Evers"/><br /><sub><b>Kristian Evers</b></sub></a><br /><a href="#question-kbevers" title="Answering Questions">πŸ’¬</a> <a href="#ideas-kbevers" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
+    <td align="center"><a href="https://evers.dev/"><img src="https://avatars3.githubusercontent.com/u/13132571?v=4" width="100px;" alt="Kristian Evers"/><br /><sub><b>Kristian Evers</b></sub></a><br /><a href="#question-kbevers" title="Answering Questions">πŸ’¬</a> <a href="#ideas-kbevers" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/snowman2/pyproj/commits?author=kbevers" title="Documentation">πŸ“–</a></td>
     <td align="center"><a href="http://www.spatialys.com/en/about/"><img src="https://avatars2.githubusercontent.com/u/1192433?v=4" width="100px;" alt="Even Rouault"/><br /><sub><b>Even Rouault</b></sub></a><br /><a href="#question-rouault" title="Answering Questions">πŸ’¬</a></td>
     <td align="center"><a href="https://github.com/cgohlke"><img src="https://avatars3.githubusercontent.com/u/483428?v=4" width="100px;" alt="Christoph Gohlke"/><br /><sub><b>Christoph Gohlke</b></sub></a><br /><a href="#platform-cgohlke" title="Packaging/porting to new platform">πŸ“¦</a> <a href="#question-cgohlke" title="Answering Questions">πŸ’¬</a> <a href="https://github.com/snowman2/pyproj/issues?q=author%3Acgohlke" title="Bug reports">πŸ›</a></td>
     <td align="center"><a href="https://github.com/chrrrisw"><img src="https://avatars0.githubusercontent.com/u/5555320?v=4" width="100px;" alt="Chris Willoughby"/><br /><sub><b>Chris Willoughby</b></sub></a><br /><a href="https://github.com/snowman2/pyproj/commits?author=chrrrisw" title="Code">πŸ’»</a></td>
   </tr>
 </table>
 
+<!-- markdownlint-enable -->
+<!-- prettier-ignore-end -->
 <!-- ALL-CONTRIBUTORS-LIST:END -->
 
 This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
\ No newline at end of file


=====================================
appveyor.yml
=====================================
@@ -21,19 +21,19 @@ environment:
     #   PYTHON_ARCH: "64"
     #   VS_VERSION: Visual Studio 14
     #   APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
-    #   PROJSOURCE: 6.2.0
+    #   PROJSOURCE: 6.2.1
     - PYTHON: "C:\\Python36-x64"
       PYTHON_VERSION: "3.6"
       PYTHON_ARCH: "64"
       VS_VERSION: Visual Studio 14
       APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
-      PROJSOURCE: 6.2.0
+      PROJSOURCE: 6.2.1
   # - PYTHON: "C:\\Python37-x64"
     #   PYTHON_VERSION: "3.7"
     #   PYTHON_ARCH: "64"
     #   VS_VERSION: Visual Studio 14
     #   APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
-    #   PROJSOURCE: 6.2.0
+    #   PROJSOURCE: 6.2.1
     # - PYTHON: "C:\\Python36-x64"
     #   PYTHON_VERSION: "3.6"
     #   PYTHON_ARCH: "64"


=====================================
debian/changelog
=====================================
@@ -1,3 +1,17 @@
+python-pyproj (2.4.1~rc0+ds-1~exp1) experimental; urgency=medium
+
+  * New upstream release candidate.
+  * Bump Standards-Version to 4.4.1, no changes.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 02 Nov 2019 07:03:53 +0100
+
+python-pyproj (2.4.0+ds-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Move from experimental to unstable.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 21 Sep 2019 06:27:00 +0200
+
 python-pyproj (2.4~rc1+ds-1~exp1) experimental; urgency=medium
 
   * New upstream release candidate.


=====================================
debian/control
=====================================
@@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9),
                python3-pytest,
                python3-pytest-cov,
                python3-shapely
-Standards-Version: 4.4.0
+Standards-Version: 4.4.1
 Vcs-Browser: https://salsa.debian.org/debian-gis-team/python-pyproj
 Vcs-Git: https://salsa.debian.org/debian-gis-team/python-pyproj.git -b experimental
 Homepage: https://github.com/pyproj4/pyproj


=====================================
pyproj/__init__.py
=====================================
@@ -47,7 +47,7 @@ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 LOSS OF 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. """
-__version__ = "2.4.rc1"
+__version__ = "2.4.1.rc0"
 __all__ = [
     "Proj",
     "Geod",


=====================================
pyproj/_crs.pxd
=====================================
@@ -109,6 +109,7 @@ cdef class CoordinateOperation(Base):
     cdef readonly object has_ballpark_transformation
     cdef readonly object _towgs84
     cdef readonly object _operations
+    cdef readonly type_name
 
     @staticmethod
     cdef create(PJ_CONTEXT* context, PJ* coordinate_operation_pj)


=====================================
pyproj/_crs.pyx
=====================================
@@ -1327,6 +1327,14 @@ cdef class Grid:
         )
 
 
+_COORDINATE_OPERATION_TYPE_MAP = {
+    PJ_TYPE_UNKNOWN: "Unknown",
+    PJ_TYPE_CONVERSION: "Conversion",
+    PJ_TYPE_TRANSFORMATION: "Transformation",
+    PJ_TYPE_CONCATENATED_OPERATION: "Concatenated Operation",
+    PJ_TYPE_OTHER_COORDINATE_OPERATION: "Other Coordinate Operation",
+}
+
 cdef class CoordinateOperation(Base):
     """
     .. versionadded:: 2.2.0
@@ -1405,6 +1413,8 @@ cdef class CoordinateOperation(Base):
                 coord_operation.context,
                 coord_operation.projobj
             ) == 1
+        cdef PJ_TYPE operation_type = proj_get_type(coord_operation.projobj)
+        coord_operation.type_name = _COORDINATE_OPERATION_TYPE_MAP[operation_type]
         CRSError.clear()
         return coord_operation
 
@@ -1665,6 +1675,18 @@ cdef class CoordinateOperation(Base):
         self._operations = _get_concatenated_operations(self.context, self.projobj)
         return self._operations
 
+    def __repr__(self):
+        return (
+            "<Coordinate Operation: {type_name}>\n"
+            "{name}\n"
+            "Area of Use:\n{area_of_use}"
+        ).format(
+            type_name=self.type_name,
+            name=self.name,
+            area_of_use=self.area_of_use or "- undefined",
+        )
+
+
 _CRS_TYPE_MAP = {
     PJ_TYPE_UNKNOWN: "Unknown CRS",
     PJ_TYPE_CRS: "CRS",


=====================================
pyproj/cf1x8.py
=====================================
@@ -41,8 +41,8 @@ INVERSE_GRID_MAPPING_NAME_MAP = {
 PROJ_PARAM_MAP = {
     "azimuth_of_central_line": "alpha",
     "earth_radius": "R",
-    "fase_easting": "x_0",
-    "fase_northing": "y_0",
+    "false_easting": "x_0",
+    "false_northing": "y_0",
     "latitude_of_projection_origin": "lat_0",
     "north_pole_grid_longitude": "lon_0",
     "straight_vertical_longitude_from_pole": "lon_0",
@@ -95,8 +95,8 @@ PARAM_TO_CF_MAP = {
     "Scale factor at natural origin": "scale_factor_at_central_meridian",
     "Easting at projection centre": "false_easting",
     "Northing at projection centre": "false_northing",
-    "Easting at false origin": "fase_easting",
-    "Northing at false origin": "fase_northing",
+    "Easting at false origin": "false_easting",
+    "Northing at false origin": "false_northing",
     "False easting": "false_easting",
     "False northing": "false_northing",
 }


=====================================
pyproj/crs.py
=====================================
@@ -226,7 +226,7 @@ class CRS(_CRS):
                 ORDER[2],
                 LENGTHUNIT["metre",1,
                     ID["EPSG",9001]]]
-        >>> crs_utm.coordinate_operation
+        >>> print(crs_utm.coordinate_operation.to_wkt(pretty=True))
         CONVERSION["UTM zone 15N",
             METHOD["Transverse Mercator",
                 ID["EPSG",9807]],
@@ -438,7 +438,10 @@ class CRS(_CRS):
 
     @classmethod
     def from_authority(cls, auth_name, code):
-        """Make a CRS from an authority name and authority code
+        """
+        .. versionadded:: 2.2.0
+        
+        Make a CRS from an authority name and authority code
 
         Parameters
         ----------
@@ -470,7 +473,10 @@ class CRS(_CRS):
 
     @classmethod
     def from_proj4(cls, in_proj_string):
-        """Make a CRS from a PROJ string
+        """
+        .. versionadded:: 2.2.0
+
+        Make a CRS from a PROJ string
 
         Parameters
         ----------
@@ -487,7 +493,10 @@ class CRS(_CRS):
 
     @classmethod
     def from_wkt(cls, in_wkt_string):
-        """Make a CRS from a WKT string
+        """
+        .. versionadded:: 2.2.0
+
+        Make a CRS from a WKT string
 
         Parameters
         ----------
@@ -504,7 +513,8 @@ class CRS(_CRS):
 
     @classmethod
     def from_string(cls, in_crs_string):
-        """Make a CRS from:
+        """
+        Make a CRS from:
 
         Initialize a CRS class instance with:
          - PROJ string
@@ -524,7 +534,10 @@ class CRS(_CRS):
         return cls(_prepare_from_string(in_crs_string))
 
     def to_string(self):
-        """Convert the CRS to a string.
+        """
+        .. versionadded:: 2.2.0
+
+        Convert the CRS to a string.
 
         It attempts to convert it to the authority string.
         Otherwise, it uses the string format of the user
@@ -585,7 +598,10 @@ class CRS(_CRS):
 
     @classmethod
     def from_dict(cls, proj_dict):
-        """Make a CRS from a dictionary of PROJ parameters.
+        """
+        .. versionadded:: 2.2.0
+
+        Make a CRS from a dictionary of PROJ parameters.
 
         Parameters
         ----------
@@ -601,10 +617,10 @@ class CRS(_CRS):
     @classmethod
     def from_json(cls, crs_json):
         """
-        Create CRS from a CRS JSON string.
-
         .. versionadded:: 2.4.0
 
+        Create CRS from a CRS JSON string.
+
         Parameters
         ----------
         crs_json: str
@@ -619,10 +635,10 @@ class CRS(_CRS):
     @classmethod
     def from_json_dict(cls, crs_dict):
         """
-        Create CRS from a JSON dictionary.
-
         .. versionadded:: 2.4.0
 
+        Create CRS from a JSON dictionary.
+
         Parameters
         ----------
         crs_dict: dict
@@ -704,12 +720,15 @@ class CRS(_CRS):
         """
 
         cf_dict = {"crs_wkt": self.to_wkt(wkt_version)}
-        if self.is_geographic and self.name != "unknown":
+        missing_names = ("unknown", "unnamed")
+        if self.is_geographic and self.name not in missing_names:
             cf_dict["geographic_crs_name"] = self.name
-        elif self.is_projected and self.name != "unknown":
+        elif self.is_projected and self.name not in missing_names:
             cf_dict["projected_crs_name"] = self.name
 
         proj_dict = self.to_dict()
+        if not proj_dict:
+            return cf_dict
         proj_name = proj_dict.pop("proj")
         lonlat_possible_names = ("lonlat", "latlon", "longlat", "latlong")
         if proj_name in lonlat_possible_names:
@@ -759,6 +778,8 @@ class CRS(_CRS):
             ]
         elif "lat_1" in proj_dict:
             cf_dict["standard_parallel"] = proj_dict.pop("lat_1")
+        elif "lat_ts" in proj_dict:
+            cf_dict["standard_parallel"] = proj_dict.pop("lat_ts")
 
         skipped_params = []
         for proj_param, proj_val in proj_dict.items():
@@ -812,7 +833,7 @@ class CRS(_CRS):
             )
         proj_dict = {"proj": proj_name}
         if grid_mapping_name == "rotated_latitude_longitude":
-            proj_dict["o_proj"] = "latlon"
+            proj_dict["o_proj"] = "longlat"
         elif grid_mapping_name == "oblique_mercator":
             try:
                 proj_dict["lonc"] = in_cf.pop("longitude_of_projection_origin")
@@ -824,6 +845,8 @@ class CRS(_CRS):
             if isinstance(standard_parallel, list):
                 proj_dict["lat_1"] = standard_parallel[0]
                 proj_dict["lat_2"] = standard_parallel[1]
+            elif proj_name == "merc":
+                proj_dict["lat_ts"] = standard_parallel
             else:
                 proj_dict["lat_1"] = standard_parallel
 


=====================================
pyproj/datadir.py
=====================================
@@ -18,7 +18,7 @@ def set_data_dir(proj_data_dir):
     Parameters
     ----------
     proj_data_dir: str
-        The path to rhe PROJ data directory.
+        The path to the PROJ data directory.
     """
     global _USER_PROJ_DATA
     global _VALIDATED_PROJ_DATA
@@ -40,7 +40,7 @@ def append_data_dir(proj_data_dir):
     Parameters
     ----------
     proj_data_dir: str
-        The path to rhe PROJ data directory.
+        The path to the PROJ data directory.
     """
     set_data_dir(os.pathsep.join([get_data_dir(), proj_data_dir]))
 


=====================================
pyproj/transformer.py
=====================================
@@ -82,6 +82,15 @@ class TransformerGroup(_TransformerGroup):
             The area of interest to help order the transformations based on the
             best operation for the area.
 
+        Example:
+
+        >>> from pyproj.transformer import TransformerGroup
+        >>> trans_group = TransformerGroup(4326, 2964)
+        >>> trans_group
+        <TransformerGroup: best_available=True>
+        - transformers: 8
+        - unavailable_operations: 1
+
         """
         super(TransformerGroup, self).__init__(
             CRS.from_user_input(crs_from),
@@ -118,6 +127,17 @@ class TransformerGroup(_TransformerGroup):
         """
         return self._best_available
 
+    def __repr__(self):
+        return (
+            "<TransformerGroup: best_available={best_available}>\n"
+            "- transformers: {transformers}\n"
+            "- unavailable_operations: {unavailable_operations}"
+        ).format(
+            best_available=self.best_available,
+            transformers=len(self.transformers),
+            unavailable_operations=len(self.unavailable_operations),
+        )
+
 
 class Transformer:
     """


=====================================
setup.py
=====================================
@@ -226,6 +226,7 @@ setup(
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
         "Topic :: Software Development :: Libraries :: Python Modules",
         "Topic :: Scientific/Engineering :: GIS",
         "Topic :: Scientific/Engineering :: Mathematics",


=====================================
test/test_crs.py
=====================================
@@ -1,6 +1,8 @@
+from distutils.version import LooseVersion
+
 import pytest
 
-from pyproj import CRS, Transformer
+from pyproj import CRS, Transformer, proj_version_str
 from pyproj._crs import CoordinateSystem
 from pyproj.crs import CoordinateOperation, Datum, Ellipsoid, PrimeMeridian
 from pyproj.enums import ProjVersion, WktVersion
@@ -463,7 +465,13 @@ def test_coordinate_system_geog():
 
 def test_coordinate_operation():
     crs = CRS.from_epsg(26915)
-    assert repr(crs.coordinate_operation).startswith('CONVERSION["UTM zone 15N"')
+    assert repr(crs.coordinate_operation) == (
+        "<Coordinate Operation: Conversion>\n"
+        "UTM zone 15N\n"
+        "Area of Use:\n"
+        "- name: World - N hemisphere - 96Β°W to 90Β°W\n"
+        "- bounds: (-96.0, 0.0, -90.0, 84.0)"
+    )
     assert crs.coordinate_operation.method_name == "Transverse Mercator"
     assert crs.coordinate_operation.name == str(crs.coordinate_operation)
     assert crs.coordinate_operation.method_auth_name == "EPSG"
@@ -874,8 +882,24 @@ def test_to_dict_no_proj4():
             "proj": "ob_tran",
         }
     )
-    assert crs.to_proj4() is None
-    assert crs.to_dict() == {}
+    if LooseVersion(proj_version_str) >= LooseVersion("6.3.0"):
+        assert crs.to_proj4() == (
+            "+proj=ob_tran +o_proj=longlat +lon_0=-10 +o_lat_p=30 "
+            "+o_lon_p=0 +R=6371229 +no_defs +type=crs"
+        )
+        assert crs.to_dict() == {
+            "R": 6371229,
+            "lon_0": -10,
+            "no_defs": None,
+            "o_lat_p": 30,
+            "o_lon_p": 0,
+            "o_proj": "longlat",
+            "proj": "ob_tran",
+            "type": "crs",
+        }
+    else:
+        assert crs.to_proj4() is None
+        assert crs.to_dict() == {}
 
 
 def test_to_dict_from_dict():


=====================================
test/test_crs_cf.py
=====================================
@@ -1,7 +1,9 @@
+from distutils.version import LooseVersion
+
 import pytest
 from numpy.testing import assert_almost_equal
 
-from pyproj import CRS
+from pyproj import CRS, proj_version_str
 from pyproj.exceptions import CRSError
 
 
@@ -25,8 +27,8 @@ def test_to_cf_transverse_mercator():
         "grid_mapping_name": "transverse_mercator",
         "latitude_of_projection_origin": 0,
         "longitude_of_central_meridian": 15,
-        "fase_easting": 2520000,
-        "fase_northing": 0,
+        "false_easting": 2520000,
+        "false_northing": 0,
         "reference_ellipsoid_name": "intl",
         "towgs84": towgs84_test,
         "unit": "m",
@@ -53,8 +55,8 @@ def test_from_cf_transverse_mercator():
             "grid_mapping_name": "transverse_mercator",
             "latitude_of_projection_origin": 0,
             "longitude_of_central_meridian": 15,
-            "fase_easting": 2520000,
-            "fase_northing": 0,
+            "false_easting": 2520000,
+            "false_northing": 0,
             "reference_ellipsoid_name": "intl",
             "towgs84": towgs84_test,
             "unit": "m",
@@ -67,8 +69,8 @@ def test_from_cf_transverse_mercator():
     assert cf_dict["grid_mapping_name"] == "transverse_mercator"
     assert cf_dict["latitude_of_projection_origin"] == 0
     assert cf_dict["longitude_of_central_meridian"] == 15
-    assert cf_dict["fase_easting"] == 2520000
-    assert cf_dict["fase_northing"] == 0
+    assert cf_dict["false_easting"] == 2520000
+    assert cf_dict["false_northing"] == 0
     assert cf_dict["reference_ellipsoid_name"] == "intl"
     assert cf_dict["unit"] == "m"
     assert_almost_equal(cf_dict["towgs84"], list(towgs84_test))
@@ -147,20 +149,27 @@ def test_cf_rotated_latlon():
             grid_north_pole_longitude=170.0,
         )
     )
-    assert crs.to_dict() == {
-        "proj": "ob_tran",
-        "o_proj": "latlon",
-        "o_lat_p": 32.5,
-        "o_lon_p": 170.0,
-        "type": "crs",
-    }
     cf_dict = crs.to_cf()
-    assert cf_dict.pop("crs_wkt").startswith("PROJCRS[")
-    assert cf_dict == dict(
-        grid_mapping_name="rotated_latitude_longitude",
-        grid_north_pole_latitude=32.5,
-        grid_north_pole_longitude=170.0,
-    )
+    assert cf_dict.pop("crs_wkt").startswith("GEOGCRS[")
+    if LooseVersion(proj_version_str) >= LooseVersion("6.3.0"):
+        assert crs.to_dict() == {
+            "proj": "ob_tran",
+            "o_proj": "longlat",
+            "o_lat_p": 32.5,
+            "o_lon_p": 170.0,
+            "datum": "WGS84",
+            "no_defs": None,
+            "type": "crs",
+        }
+        assert cf_dict == dict(
+            grid_mapping_name="rotated_latitude_longitude",
+            grid_north_pole_latitude=32.5,
+            grid_north_pole_longitude=170.0,
+            horizontal_datum_name="WGS84",
+        )
+    else:
+        assert cf_dict == {}
+        assert crs.to_dict() == {}
 
 
 def test_cf_rotated_latlon__grid():
@@ -172,14 +181,19 @@ def test_cf_rotated_latlon__grid():
             north_pole_grid_longitude=0,
         )
     )
-    assert crs.to_dict() == {
-        "proj": "ob_tran",
-        "o_proj": "latlon",
-        "o_lat_p": 32.5,
-        "o_lon_p": 170.0,
-        "lon_0": 0,
-        "type": "crs",
-    }
+    if LooseVersion(proj_version_str) >= LooseVersion("6.3.0"):
+        assert crs.to_dict() == {
+            "proj": "ob_tran",
+            "o_proj": "longlat",
+            "o_lat_p": 32.5,
+            "o_lon_p": 170.0,
+            "lon_0": 0,
+            "datum": "WGS84",
+            "no_defs": None,
+            "type": "crs",
+        }
+    else:
+        assert crs.to_dict() == {}
 
 
 def test_cf_lambert_conformal_conic():
@@ -200,8 +214,8 @@ def test_cf_lambert_conformal_conic():
         "scale_factor_at_projection_origin": 1,
         "standard_parallel": 25,
         "latitude_of_projection_origin": 25,
-        "fase_easting": 0,
-        "fase_northing": 0,
+        "false_easting": 0,
+        "false_northing": 0,
         "horizontal_datum_name": "WGS84",
         "unit": "m",
     }
@@ -225,8 +239,8 @@ def test_cf_lambert_conformal_conic_1sp():
         "scale_factor_at_projection_origin": 1,
         "standard_parallel": 25,
         "latitude_of_projection_origin": 25,
-        "fase_easting": 0,
-        "fase_northing": 0,
+        "false_easting": 0,
+        "false_northing": 0,
         "horizontal_datum_name": "WGS84",
         "unit": "m",
     }
@@ -263,8 +277,8 @@ def test_cf_lambert_conformal_conic_2sp():
         "longitude_of_central_meridian": 265,
         "standard_parallel": [25, 30],
         "latitude_of_projection_origin": 25,
-        "fase_easting": 0,
-        "fase_northing": 0,
+        "false_easting": 0,
+        "false_northing": 0,
         "horizontal_datum_name": "WGS84",
         "unit": "m",
     }
@@ -303,8 +317,8 @@ def test_oblique_mercator():
         "latitude_of_projection_origin": 10,
         "longitude_of_projection_origin": 15,
         "azimuth_of_central_line": 0.35,
-        "fase_easting": 0,
-        "fase_northing": 0,
+        "false_easting": 0,
+        "false_northing": 0,
         "reference_ellipsoid_name": "WGS84",
         "unit": "m",
     }
@@ -372,8 +386,8 @@ def test_crs_sweep():
         "longitude_of_projection_origin": 0,
         "sweep_angle_axis": "x",
         "perspective_point_height": 1,
-        "fase_easting": 0,
-        "fase_northing": 0,
+        "false_easting": 0,
+        "false_northing": 0,
         "horizontal_datum_name": "WGS84",
         "unit": "m",
     }
@@ -394,8 +408,8 @@ def test_crs_fixed_angle_axis():
         "longitude_of_projection_origin": 0,
         "sweep_angle_axis": "x",
         "perspective_point_height": 1,
-        "fase_easting": 0,
-        "fase_northing": 0,
+        "false_easting": 0,
+        "false_northing": 0,
         "horizontal_datum_name": "WGS84",
         "unit": "m",
     }
@@ -411,3 +425,37 @@ def test_ob_tran_not_rotated_latlon():
         "grid_north_pole_latitude": 45,
         "grid_north_pole_longitude": -90,
     }
+
+
+def test_mercator():
+    crs = CRS.from_cf(
+        {
+            "grid_mapping_name": "mercator",
+            "longitude_of_projection_origin": 10,
+            "standard_parallel": 21.354,
+            "false_easting": 0,
+            "false_northing": 0,
+        }
+    )
+    assert crs.to_dict() == {
+        "datum": "WGS84",
+        "lat_ts": 21.354,
+        "lon_0": 10,
+        "no_defs": None,
+        "proj": "merc",
+        "type": "crs",
+        "units": "m",
+        "x_0": 0,
+        "y_0": 0,
+    }
+    cf_dict = crs.to_cf()
+    assert cf_dict.pop("crs_wkt").startswith("PROJCRS[")
+    assert cf_dict == {
+        "grid_mapping_name": "mercator",
+        "longitude_of_projection_origin": 10,
+        "standard_parallel": 21.354,
+        "false_easting": 0,
+        "false_northing": 0,
+        "horizontal_datum_name": "WGS84",
+        "unit": "m",
+    }


=====================================
test/test_doctest_wrapper.py
=====================================
@@ -5,6 +5,7 @@ pytest can conveniently run all the tests in a single command line.
 import doctest
 import os
 import platform
+import sys
 
 import pyproj
 
@@ -25,12 +26,16 @@ def test_doctests():
         + failure_count_geod
         + failure_count_transform
     )
-    # shapely wheels not on windows, so allow failures there
+    # Missing shapely wheels for Windows, non x86_64 platforms, and python 3.8
     expected_failure_count = 0
     try:
         import shapely  # noqa
     except ImportError:
-        if os.name == "nt" or platform.uname()[4] != "x86_64":
+        if (
+            os.name == "nt"
+            or platform.uname()[4] != "x86_64"
+            or (sys.version_info.major, sys.version_info.minor) >= (3, 8)
+        ):
             expected_failure_count = 6
 
     # if the below line fails, doctests have failed


=====================================
test/test_geod.py
=====================================
@@ -3,6 +3,7 @@ import os
 import pickle
 import platform
 import shutil
+import sys
 import tempfile
 from contextlib import contextmanager
 
@@ -28,8 +29,13 @@ except ImportError:
 
 
 skip_shapely = pytest.mark.skipif(
-    not SHAPELY_LOADED and (os.name == "nt" or platform.uname()[4] != "x86_64"),
-    reason="Missing shapely wheels for Windows.",
+    not SHAPELY_LOADED
+    and (
+        os.name == "nt"
+        or platform.uname()[4] != "x86_64"
+        or (sys.version_info.major, sys.version_info.minor) >= (3, 8)
+    ),
+    reason="Missing shapely wheels for Windows, non x86_64 platforms, and python 3.8.",
 )
 
 


=====================================
test/test_transformer.py
=====================================
@@ -1,13 +1,14 @@
 import os
 import shutil
 import tempfile
+from distutils.version import LooseVersion
 
 import numpy as np
 import pytest
 from numpy.testing import assert_almost_equal
 
 import pyproj
-from pyproj import Proj, Transformer, itransform, transform
+from pyproj import Proj, Transformer, itransform, proj_version_str, transform
 from pyproj.enums import TransformDirection
 from pyproj.exceptions import ProjError
 from pyproj.transformer import AreaOfInterest, TransformerGroup
@@ -260,7 +261,11 @@ def test_transform_no_exception():
 def test_transform__out_of_bounds():
     with pytest.warns(DeprecationWarning):
         transformer = Transformer.from_proj("+init=epsg:4326", "+init=epsg:27700")
-    assert np.all(np.isinf(transformer.transform(100000, 100000, errcheck=True)))
+    if LooseVersion(proj_version_str) >= LooseVersion("6.3.0"):
+        with pytest.raises(ProjError):
+            transformer.transform(100000, 100000, errcheck=True)
+    else:
+        assert np.all(np.isinf(transformer.transform(100000, 100000, errcheck=True)))
 
 
 def test_transform_radians():



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/compare/683cef972b79ed9d2a5a63ffbceb6dc9df670791...586620dd72daa2a1eeb28628c906fa7751cee65e

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/compare/683cef972b79ed9d2a5a63ffbceb6dc9df670791...586620dd72daa2a1eeb28628c906fa7751cee65e
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20191102/ddbd1f0f/attachment-0001.html>


More information about the Pkg-grass-devel mailing list