From 9fd0b83dbb47e9179d7b66f3368071a75c4a9fbd Mon Sep 17 00:00:00 2001 From: Jeff Whitaker Date: Sun, 17 Mar 2019 16:02:02 -0600 Subject: [PATCH 1/2] update docs --- docs/html/.buildinfo | 2 +- docs/html/_modules/index.html | 6 +- docs/html/_modules/pyproj/crs.html | 6 +- docs/html/_modules/pyproj/datadir.html | 6 +- docs/html/_modules/pyproj/geod.html | 6 +- docs/html/_modules/pyproj/proj.html | 6 +- docs/html/_modules/pyproj/transformer.html | 43 +++++++---- docs/html/_sources/history.rst.txt | 5 ++ docs/html/_static/documentation_options.js | 2 +- docs/html/api/crs.html | 6 +- docs/html/api/datadir.html | 6 +- docs/html/api/geod.html | 6 +- docs/html/api/index.html | 6 +- docs/html/api/proj.html | 6 +- docs/html/api/transformer.html | 32 ++++++--- docs/html/genindex.html | 6 +- docs/html/history.html | 79 ++++++++++++--------- docs/html/index.html | 6 +- docs/html/installation.html | 6 +- docs/html/objects.inv | Bin 712 -> 712 bytes docs/html/search.html | 6 +- docs/html/searchindex.js | 2 +- 22 files changed, 146 insertions(+), 103 deletions(-) diff --git a/docs/html/.buildinfo b/docs/html/.buildinfo index 07a8dcb63..358482522 100644 --- a/docs/html/.buildinfo +++ b/docs/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 1e92fe056de4846e3be4685b80c5b77c +config: f3e7ee21504f9860ee8366e916a78dde tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/html/_modules/index.html b/docs/html/_modules/index.html index 32ac205f3..90e7f0dca 100644 --- a/docs/html/_modules/index.html +++ b/docs/html/_modules/index.html @@ -6,7 +6,7 @@ - Overview: module code — pyproj 2.1.0 documentation + Overview: module code — pyproj 2.1.1 documentation @@ -22,7 +22,7 @@

Navigation

  • index
  • - + @@ -67,7 +67,7 @@

    Navigation

  • index
  • - + @@ -342,7 +342,7 @@

    Navigation

  • index
  • - + diff --git a/docs/html/_modules/pyproj/datadir.html b/docs/html/_modules/pyproj/datadir.html index 0de617691..47609c075 100644 --- a/docs/html/_modules/pyproj/datadir.html +++ b/docs/html/_modules/pyproj/datadir.html @@ -6,7 +6,7 @@ - pyproj.datadir — pyproj 2.1.0 documentation + pyproj.datadir — pyproj 2.1.1 documentation @@ -22,7 +22,7 @@

    Navigation

  • index
  • - + @@ -128,7 +128,7 @@

    Navigation

  • index
  • - + diff --git a/docs/html/_modules/pyproj/geod.html b/docs/html/_modules/pyproj/geod.html index df2afb4f6..c939c0d34 100644 --- a/docs/html/_modules/pyproj/geod.html +++ b/docs/html/_modules/pyproj/geod.html @@ -6,7 +6,7 @@ - pyproj.geod — pyproj 2.1.0 documentation + pyproj.geod — pyproj 2.1.1 documentation @@ -22,7 +22,7 @@

    Navigation

  • index
  • - + @@ -515,7 +515,7 @@

    Navigation

  • index
  • - + diff --git a/docs/html/_modules/pyproj/proj.html b/docs/html/_modules/pyproj/proj.html index 2a00926a0..c9ef59cba 100644 --- a/docs/html/_modules/pyproj/proj.html +++ b/docs/html/_modules/pyproj/proj.html @@ -6,7 +6,7 @@ - pyproj.proj — pyproj 2.1.0 documentation + pyproj.proj — pyproj 2.1.1 documentation @@ -22,7 +22,7 @@

    Navigation

  • index
  • - + @@ -451,7 +451,7 @@

    Navigation

  • index
  • - + diff --git a/docs/html/_modules/pyproj/transformer.html b/docs/html/_modules/pyproj/transformer.html index b1e9393ce..f5af74409 100644 --- a/docs/html/_modules/pyproj/transformer.html +++ b/docs/html/_modules/pyproj/transformer.html @@ -6,7 +6,7 @@ - pyproj.transformer — pyproj 2.1.0 documentation + pyproj.transformer — pyproj 2.1.1 documentation @@ -22,7 +22,7 @@

    Navigation

  • index
  • - + @@ -135,7 +135,7 @@

    Source code for pyproj.transformer

             transformer._transformer = _Transformer.from_pipeline(cstrencode(proj_pipeline))
             return transformer
    -
    [docs] def transform(self, xx, yy, zz=None, radians=False): +
    [docs] def transform(self, xx, yy, zz=None, radians=False, errcheck=False): """ Transform points between two coordinate systems. @@ -149,7 +149,12 @@

    Source code for pyproj.transformer

                 Input z coordinate(s).
             radians: boolean, optional
                 If True, will expect input data to be in radians and will return radians
    -            if the projection is geographic. Default is False (degrees).
    +            if the projection is geographic. Default is False (degrees). Ignored for
    +            pipeline transformations.
    +        errcheck: boolean, optional (default False)
    +            If True an exception is raised if the transformation is invalid.
    +            By default errcheck=False and an invalid transformation 
    +            returns ``inf`` and no exception is raised.
     
     
             Example:
    @@ -182,7 +187,7 @@ 

    Source code for pyproj.transformer

             else:
                 inz = None
             # call pj_transform.  inx,iny,inz buffers modified in place.
    -        self._transformer._transform(inx, iny, inz, radians)
    +        self._transformer._transform(inx, iny, inz, radians, errcheck=errcheck)
             # if inputs were lists, tuples or floats, convert back.
             outx = _convertback(xisfloat, xislist, xistuple, inx)
             outy = _convertback(yisfloat, yislist, xistuple, iny)
    @@ -192,7 +197,7 @@ 

    Source code for pyproj.transformer

             else:
                 return outx, outy
    -
    [docs] def itransform(self, points, switch=False, radians=False): +
    [docs] def itransform(self, points, switch=False, radians=False, errcheck=False): """ Iterator/generator version of the function pyproj.Transformer.transform. @@ -206,7 +211,12 @@

    Source code for pyproj.transformer

                 or lat, lon. Default is False.
             radians: boolean, optional
                 If True, will expect input data to be in radians and will return radians
    -            if the projection is geographic. Default is False (degrees).
    +            if the projection is geographic. Default is False (degrees). Ignored for
    +            pipeline transformations.
    +        errcheck: boolean, optional (default False)
    +            If True an exception is raised if the transformation is invalid.
    +            By default errcheck=False and an invalid transformation 
    +            returns ``inf`` and no exception is raised.
     
     
             Example:
    @@ -251,13 +261,14 @@ 

    Source code for pyproj.transformer

                 if len(buff) == 0:
                     break
     
    -            self._transformer._transform_sequence(stride, buff, switch, radians)
    +            self._transformer._transform_sequence(stride, buff, switch,
    +                    radians, errcheck=errcheck)
     
                 for pt in zip(*([iter(buff)] * stride)):
                     yield pt
    -
    [docs]def transform(p1, p2, x, y, z=None, radians=False): +
    [docs]def transform(p1, p2, x, y, z=None, radians=False, errcheck=False): """ x2, y2, z2 = transform(p1, p2, x1, y1, z1) @@ -272,6 +283,10 @@

    Source code for pyproj.transformer

         'radians' is True (default is False), then all input and 
         output coordinates will be in radians instead of the default 
         of degrees for geographic input/output projections.
    +    If the optional keyword 'errcheck' is set to True an 
    +    exception is raised if the transformation is
    +    invalid. By default errcheck=False and ``inf`` is returned for an
    +    invalid transformation (and no exception is raised).
     
         In addition to converting between cartographic and geographic
         projection coordinates, this function can take care of datum
    @@ -337,10 +352,11 @@ 

    Source code for pyproj.transformer

         >>> "%.3f %.3f" % (xr, yr)
         '2.031 0.696'
         """
    -    return Transformer.from_proj(p1, p2).transform(x, y, z, radians)
    + return Transformer.from_proj(p1, p2).transform(x, y, z, radians, + errcheck=errcheck)
    -
    [docs]def itransform(p1, p2, points, switch=False, radians=False): +
    [docs]def itransform(p1, p2, points, switch=False, radians=False, errcheck=False): """ points2 = itransform(p1, p2, points1) Iterator/generator version of the function pyproj.transform. @@ -384,7 +400,8 @@

    Source code for pyproj.transformer

         >>> for pt in itransform(pj, Proj(4326), [(pjx, pjy)], radians=True): '{:.3f} {:.3f}'.format(*pt)
         '2.031 0.696'
         """
    -    return Transformer.from_proj(p1, p2).itransform(points, switch, radians)
    + return Transformer.from_proj(p1, p2).itransform(points, switch, radians, + errcheck=errcheck)
    @@ -414,7 +431,7 @@

    Navigation

  • index
  • - +
    diff --git a/docs/html/_sources/history.rst.txt b/docs/html/_sources/history.rst.txt index d9fb36d57..c0650bd8c 100644 --- a/docs/html/_sources/history.rst.txt +++ b/docs/html/_sources/history.rst.txt @@ -1,5 +1,10 @@ Change Log ========== +2.1.1 +~~~~~ +* Restore behavior of 1.9.6 when illegal projection transformation requested + (return `inf` instead of raising an exception). kwarg `errcheck` added + to transform (default `False`), when `True` and exception is raised. 2.1.0 ~~~~~ diff --git a/docs/html/_static/documentation_options.js b/docs/html/_static/documentation_options.js index da6a9762e..81777b104 100644 --- a/docs/html/_static/documentation_options.js +++ b/docs/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.1.0', + VERSION: '2.1.1', LANGUAGE: 'None', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', diff --git a/docs/html/api/crs.html b/docs/html/api/crs.html index c413294c9..39423e3dc 100644 --- a/docs/html/api/crs.html +++ b/docs/html/api/crs.html @@ -6,7 +6,7 @@ - CRS — pyproj 2.1.0 documentation + CRS — pyproj 2.1.1 documentation @@ -30,7 +30,7 @@

    Navigation

  • previous |
  • - +
    @@ -401,7 +401,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/html/api/datadir.html b/docs/html/api/datadir.html index d7919e110..844a3ea2f 100644 --- a/docs/html/api/datadir.html +++ b/docs/html/api/datadir.html @@ -6,7 +6,7 @@ - Data Directory — pyproj 2.1.0 documentation + Data Directory — pyproj 2.1.1 documentation @@ -30,7 +30,7 @@

    Navigation

  • previous |
  • - + @@ -141,7 +141,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/html/api/geod.html b/docs/html/api/geod.html index 83ae6ae7d..2e59a6c89 100644 --- a/docs/html/api/geod.html +++ b/docs/html/api/geod.html @@ -6,7 +6,7 @@ - Geod — pyproj 2.1.0 documentation + Geod — pyproj 2.1.1 documentation @@ -30,7 +30,7 @@

    Navigation

  • previous |
  • - + @@ -295,7 +295,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/html/api/index.html b/docs/html/api/index.html index 7ae18bd66..52d07820a 100644 --- a/docs/html/api/index.html +++ b/docs/html/api/index.html @@ -6,7 +6,7 @@ - API Documentation — pyproj 2.1.0 documentation + API Documentation — pyproj 2.1.1 documentation @@ -30,7 +30,7 @@

    Navigation

  • previous |
  • - + @@ -119,7 +119,7 @@

    Navigation

  • previous |
  • - + @@ -269,7 +269,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/html/api/transformer.html b/docs/html/api/transformer.html index c80dbaed5..f8b1f4909 100644 --- a/docs/html/api/transformer.html +++ b/docs/html/api/transformer.html @@ -6,7 +6,7 @@ - Transformer — pyproj 2.1.0 documentation + Transformer — pyproj 2.1.1 documentation @@ -30,7 +30,7 @@

    Navigation

  • previous |
  • - + @@ -120,7 +120,7 @@

    pyproj.Transformer
    -itransform(points, switch=False, radians=False)[source]
    +itransform(points, switch=False, radians=False, errcheck=False)[source]

    Iterator/generator version of the function pyproj.Transformer.transform.

    @@ -131,7 +131,11 @@

    pyproj.Transformerinf and no exception is raised. @@ -161,7 +165,7 @@

    pyproj.Transformer
    -transform(xx, yy, zz=None, radians=False)[source]
    +transform(xx, yy, zz=None, radians=False, errcheck=False)[source]

    Transform points between two coordinate systems.

    @@ -172,7 +176,11 @@

    pyproj.Transformerinf and no exception is raised. @@ -208,7 +216,7 @@

    pyproj.Transformer

    -pyproj.transformer.transform(p1, p2, x, y, z=None, radians=False)[source]
    +pyproj.transformer.transform(p1, p2, x, y, z=None, radians=False, errcheck=False)[source]

    x2, y2, z2 = transform(p1, p2, x1, y1, z1)

    Transform points between two coordinate systems defined by the Proj instances p1 and p2.

    @@ -218,7 +226,11 @@

    pyproj.transforminf is returned for an +invalid transformation (and no exception is raised).

    In addition to converting between cartographic and geographic projection coordinates, this function can take care of datum shifts (which cannot be done using the __call__ method of the @@ -288,7 +300,7 @@

    pyproj.transform

    -pyproj.transformer.itransform(p1, p2, points, switch=False, radians=False)[source]
    +pyproj.transformer.itransform(p1, p2, points, switch=False, radians=False, errcheck=False)[source]

    points2 = itransform(p1, p2, points1) Iterator/generator version of the function pyproj.transform. Transform points between two coordinate systems defined by the @@ -394,7 +406,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/html/genindex.html b/docs/html/genindex.html index 10c7b2210..b9b49ae54 100644 --- a/docs/html/genindex.html +++ b/docs/html/genindex.html @@ -7,7 +7,7 @@ - Index — pyproj 2.1.0 documentation + Index — pyproj 2.1.1 documentation @@ -23,7 +23,7 @@

    Navigation

  • index
  • - + @@ -266,7 +266,7 @@

    Navigation

  • index
  • - + @@ -38,7 +38,15 @@

    Navigation

    Change Log

    -

    2.1.0

    +

    2.1.1

    +
      +
    • Restore behavior of 1.9.6 when illegal projection transformation requested +(return inf instead of raising an exception). kwarg errcheck added +to transform (default False), when True and exception is raised.
    • +
    +
    +
    +

    2.1.0

    -
    -

    2.0.2

    +
    +

    2.0.2

    • add filter for boolean values in dict2string so “no_rot=True” works (issue #183).
    • make sure .pxd files included in source tarball.
    • add radians flag back in for transform/itransform (issue #185).
    -
    -

    2.0.1

    +
    +

    2.0.1

    • Ensure data path set properly for TransProj (pull request #179, addressed issue #176).
    -
    -

    2.0.0

    +
    +

    2.0.0

    • Update to PROJ.4 version 6.0.0 & removed support for older PROJ.4 versions.
    • Added pyproj.CRS class.
    • @@ -73,22 +81,22 @@

      2.0.0
    • Added pyproject.toml.
    -
    -

    1.9.6

    +
    +

    1.9.6

    • fix segfault when inverse projection not defined (issue #43, pull request #44).
    • supports python 3.7
    -
    -

    1.9.5.1

    +
    +

    1.9.5.1

    • fix for issue #42 (compilation error with microsoft visual studio).
    -
    -

    1.9.5

    +
    +

    1.9.5

    • update proj4 source to latest github master (commit 953cc00fd87425395cabe37641cda905c4b587c1).
    • port of basemap fix for input arrays in fortran order
    • @@ -224,8 +232,8 @@

      1.8.3 (svn revision 146)

    -
    -

    1.8.2

    +
    +

    1.8.2

    • added ‘srs’ (spatial reference system) instance variable to Proj.
    • @@ -242,8 +250,8 @@

      1.8.2

    -
    -

    1.8.1

    +
    +

    1.8.1

    • if given tuples, returns tuples (instead of lists).
    • @@ -259,8 +267,8 @@

      1.8.1

    -
    -

    1.8.0

    +
    +

    1.8.0

    • Better error handling Proj.__init__.
    • @@ -269,8 +277,8 @@

      1.8.0

    -
    -

    1.7.3

    +
    +

    1.7.3

    @@ -104,7 +104,7 @@

    Navigation

  • next |
  • - +
    @@ -206,7 +206,7 @@

    Navigation

  • previous |
  • - +
    @@ -78,7 +78,7 @@

    Navigation

  • index
  • - +
    diff --git a/sphinx/history.rst b/sphinx/history.rst index c0650bd8c..c87ec5a53 100644 --- a/sphinx/history.rst +++ b/sphinx/history.rst @@ -3,8 +3,9 @@ Change Log 2.1.1 ~~~~~ * Restore behavior of 1.9.6 when illegal projection transformation requested - (return `inf` instead of raising an exception). kwarg `errcheck` added - to transform (default `False`), when `True` and exception is raised. + (return ``inf`` instead of raising an exception, issue #202). kwarg ``errcheck`` + added to :func:`pyproj.transform` and :func:`pyproj.itransform` + (default ``False``). When ``errcheck=True`` an exception is raised. 2.1.0 ~~~~~