Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.4.1 Release #474

Closed
4 tasks done
snowman2 opened this issue Nov 2, 2019 · 7 comments
Closed
4 tasks done

2.4.1 Release #474

snowman2 opened this issue Nov 2, 2019 · 7 comments

Comments

@snowman2
Copy link
Member

snowman2 commented Nov 2, 2019

Release Candidate 0 Status:

https://github.com/pyproj4/pyproj/releases/tag/2.4.1.rc0

@sebastic
Copy link
Contributor

sebastic commented Nov 2, 2019

Package builds looking good so far, see:

https://buildd.debian.org/status/package.php?p=python-pyproj&suite=experimental

@snowman2
Copy link
Member Author

snowman2 commented Nov 2, 2019

Package builds looking good so far, see:

https://buildd.debian.org/status/package.php?p=python-pyproj&suite=experimental

Great, thank for checking!

@snowman2
Copy link
Member Author

snowman2 commented Nov 6, 2019

@cgohlke do you have time to test out the build sometime this week?

@snowman2
Copy link
Member Author

snowman2 commented Nov 6, 2019

It is okay if you are unable to run a test with the new release. I am just checking to see if I should proceed with making a release or if I should wait a bit longer.

@cgohlke
Copy link
Contributor

cgohlke commented Nov 6, 2019

do you have time to test out the build sometime this week?

I tested the RC a couple of days ago. Looks good to me after removing ntv2_0.gsb. Wheels are at https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyproj

@snowman2
Copy link
Member Author

snowman2 commented Nov 6, 2019

Perfect, thanks!

Looks good to me after removing ntv2_0.gsb.

Did the tests still fail with it in?

@snowman2 snowman2 closed this as completed Nov 6, 2019
@cgohlke
Copy link
Contributor

cgohlke commented Nov 6, 2019

Did the tests still fail with it in?

================================================= test session starts =================================================
platform win32 -- Python 3.8.0, pytest-5.2.2, py-1.8.0, pluggy-0.13.0
rootdir: D:\Build\pyproj\pyproj-2.4.1rel
plugins: hypothesis-4.41.3, palladium-1.2.2, cov-2.8.1, forked-1.1.3, xdist-1.30.0
collected 325 items

test\test__main__.py ...                                                                                         [  0%]
test\test_awips221.py .                                                                                          [  1%]
test\test_crs.py ............................................................................................... [ 30%]
....................                                                                                             [ 36%]
test\test_crs_cf.py .................                                                                            [ 41%]
test\test_crs_json.py ..................................                                                         [ 52%]
test\test_datadir.py ..........                                                                                  [ 55%]
test\test_datum.py F                                                                                             [ 55%]
test\test_datum_shift.py ....                                                                                    [ 56%]
test\test_doctest_wrapper.py F                                                                                   [ 57%]
test\test_exception_logging.py ..                                                                                [ 57%]
test\test_geod.py ............................                                                                   [ 66%]
test\test_list.py ...................                                                                            [ 72%]
test\test_pickle.py .                                                                                            [ 72%]
test\test_proj.py .........................                                                                      [ 80%]
test\test_show_versions.py ....                                                                                  [ 81%]
test\test_transform.py .                                                                                         [ 81%]
test\test_transformer.py ...................................................FF......                             [100%]

====================================================== FAILURES =======================================================
_____________________________________________________ test_datum ______________________________________________________

    def test_datum():
        p1 = Proj(proj="latlong", datum="WGS84")
        s_1 = -111.5
        s_2 = 45.25919444444
        p2 = Proj(proj="utm", zone=10, datum="NAD27")
        x2, y2 = transform(p1, p2, s_1, s_2)
>       assert_almost_equal((x2, y2), (1402291.0833290431, 5076289.591846835))

test\test_datum.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

x = array([inf, inf]), y = array([1402291.08332904, 5076289.59184683])
func = <function assert_array_compare.<locals>.<lambda> at 0x0000026B87A3F160>, hasval = '+inf'

    def func_assert_same_pos(x, y, func=isnan, hasval='nan'):
        """Handling nan/inf.

        Combine results of running func on x and y, checking that they are True
        at the same locations.

        """
        x_id = func(x)
        y_id = func(y)
        # We include work-arounds here to handle three types of slightly
        # pathological ndarray subclasses:
        # (1) all() on `masked` array scalars can return masked arrays, so we
        #     use != True
        # (2) __eq__ on some ndarray subclasses returns Python booleans
        #     instead of element-wise comparisons, so we cast to bool_() and
        #     use isinstance(..., bool) checks
        # (3) subclasses with bare-bones __array_function__ implementations may
        #     not implement np.all(), so favor using the .all() method
        # We are not committed to supporting such subclasses, but it's nice to
        # support them if possible.
        if bool_(x_id == y_id).all() != True:
            msg = build_err_msg([x, y],
                                err_msg + '\nx and y %s location mismatch:'
                                % (hasval), verbose=verbose, header=header,
                                names=('x', 'y'), precision=precision)
>           raise AssertionError(msg)
E           AssertionError:
E           Arrays are not almost equal to 7 decimals
E
E           x and y +inf location mismatch:
E            x: array([inf, inf])
E            y: array([1402291.083329 , 5076289.5918468])

X:\Python38\lib\site-packages\numpy\testing\_private\utils.py:745: AssertionError
____________________________________________________ test_doctests ____________________________________________________

    def test_doctests():
        """run the examples in the docstrings using the doctest module"""

        failure_count_proj, test_count = doctest.testmod(pyproj.proj, verbose=True)
        failure_count_crs, test_count_crs = doctest.testmod(pyproj.crs, verbose=True)
        failure_count_geod, test_count_geod = doctest.testmod(pyproj.geod, verbose=True)
        failure_count_transform, test_count_transform = doctest.testmod(
            pyproj.transformer, verbose=True
        )

        failure_count = (
            failure_count_proj
            + failure_count_crs
            + failure_count_geod
            + failure_count_transform
        )
        # 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"
                or (sys.version_info.major, sys.version_info.minor) >= (3, 8)
            ):
                expected_failure_count = 6

        # if the below line fails, doctests have failed
>       assert (
            failure_count == expected_failure_count
        ), "{0} of the doctests in " "lib/pyproj/__init__.py failed".format(failure_count)
E       AssertionError: 3 of the doctests in lib/pyproj/__init__.py failed
E       assert 3 == 0

test\test_doctest_wrapper.py:42: AssertionError
------------------------------------------------ Captured stdout call -------------------------------------------------
Trying:
    from pyproj import Proj
Expecting nothing
ok
Trying:
    p = Proj(proj='utm',zone=10,ellps='WGS84', preserve_units=False)
Expecting nothing
ok
Trying:
    x,y = p(-120.108, 34.36116666)
Expecting nothing
ok
Trying:
    'x=%9.3f y=%11.3f' % (x,y)
Expecting:
    'x=765975.641 y=3805993.134'
ok
Trying:
    'lon=%8.3f lat=%5.3f' % p(x,y,inverse=True)
Expecting:
    'lon=-120.108 lat=34.361'
ok
Trying:
    lons = (-119.72,-118.40,-122.38)
Expecting nothing
ok
Trying:
    lats = (36.77, 33.93, 37.62 )
Expecting nothing
ok
Trying:
    x,y = p(lons, lats)
Expecting nothing
ok
Trying:
    'x: %9.3f %9.3f %9.3f' % x
Expecting:
    'x: 792763.863 925321.537 554714.301'
ok
Trying:
    'y: %9.3f %9.3f %9.3f' % y
Expecting:
    'y: 4074377.617 3763936.941 4163835.303'
ok
Trying:
    lons, lats = p(x, y, inverse=True) # inverse transform
Expecting nothing
ok
Trying:
    'lons: %8.3f %8.3f %8.3f' % lons
Expecting:
    'lons: -119.720 -118.400 -122.380'
ok
Trying:
    'lats: %8.3f %8.3f %8.3f' % lats
Expecting:
    'lats:   36.770   33.930   37.620'
ok
Trying:
    p2 = Proj('+proj=utm +zone=10 +ellps=WGS84', preserve_units=False)
Expecting nothing
ok
Trying:
    x,y = p2(-120.108, 34.36116666)
Expecting nothing
ok
Trying:
    'x=%9.3f y=%11.3f' % (x,y)
Expecting:
    'x=765975.641 y=3805993.134'
ok
Trying:
    p = Proj("epsg:32667", preserve_units=False)
Expecting nothing
ok
Trying:
    'x=%12.3f y=%12.3f (meters)' % p(-114.057222, 51.045)
Expecting:
    'x=-1783506.250 y= 6193827.033 (meters)'
ok
Trying:
    p = Proj("epsg:32667")
Expecting nothing
ok
Trying:
    'x=%12.3f y=%12.3f (feet)' % p(-114.057222, 51.045)
Expecting:
    'x=-5851386.754 y=20320914.191 (feet)'
ok
Trying:
    p1 = Proj("epsg:4214")
Expecting nothing
ok
Trying:
    x1, y1 = p1(116.366, 39.867)
Expecting nothing
ok
Trying:
    '{:.3f} {:.3f}'.format(x1, y1)
Expecting:
    '116.366 39.867'
ok
Trying:
    x2, y2 = p1(x1, y1, inverse=True)
Expecting nothing
ok
Trying:
    '{:.3f} {:.3f}'.format(x2, y2)
Expecting:
    '116.366 39.867'
ok
Trying:
    Proj("epsg:4326").definition_string()
Expecting:
    'proj=longlat datum=WGS84 no_defs ellps=WGS84 towgs84=0,0,0'
ok
8 items had no tests:
    pyproj.proj
    pyproj.proj.Proj
    pyproj.proj.Proj.__call__
    pyproj.proj.Proj.__eq__
    pyproj.proj.Proj.__reduce__
    pyproj.proj.Proj.__repr__
    pyproj.proj.Proj.to_latlong
    pyproj.proj.Proj.to_latlong_def
2 items passed all tests:
  25 tests in pyproj.proj.Proj.__init__
   1 tests in pyproj.proj.Proj.definition_string
26 tests in 10 items.
26 passed and 0 failed.
Test passed.
Trying:
    from pyproj import CRS
Expecting nothing
ok
Trying:
    crs_utm = CRS.from_user_input(26915)
Expecting nothing
ok
Trying:
    crs_utm
Expecting:
    <Projected CRS: EPSG:26915>
    Name: NAD83 / UTM zone 15N
    Axis Info [cartesian]:
    - E[east]: Easting (metre)
    - N[north]: Northing (metre)
    Area of Use:
    - name: North America - 96°W to 90°W and NAD83 by country
    - bounds: (-96.0, 25.61, -90.0, 84.0)
    Coordinate Operation:
    - name: UTM zone 15N
    - method: Transverse Mercator
    Datum: North American Datum 1983
    - Ellipsoid: GRS 1980
    - Prime Meridian: Greenwich
    <BLANKLINE>
ok
Trying:
    crs_utm.area_of_use.bounds
Expecting:
    (-96.0, 25.61, -90.0, 84.0)
ok
Trying:
    crs_utm.ellipsoid
Expecting:
    ELLIPSOID["GRS 1980",6378137,298.257222101,
        LENGTHUNIT["metre",1],
        ID["EPSG",7019]]
ok
Trying:
    crs_utm.ellipsoid.inverse_flattening
Expecting:
    298.257222101
ok
Trying:
    crs_utm.ellipsoid.semi_major_metre
Expecting:
    6378137.0
ok
Trying:
    crs_utm.ellipsoid.semi_minor_metre
Expecting:
    6356752.314140356
ok
Trying:
    crs_utm.prime_meridian
Expecting:
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433],
        ID["EPSG",8901]]
ok
Trying:
    crs_utm.prime_meridian.unit_name
Expecting:
    'degree'
ok
Trying:
    crs_utm.prime_meridian.unit_conversion_factor
Expecting:
    0.017453292519943295
ok
Trying:
    crs_utm.prime_meridian.longitude
Expecting:
    0.0
ok
Trying:
    crs_utm.datum
Expecting:
    DATUM["North American Datum 1983",
        ELLIPSOID["GRS 1980",6378137,298.257222101,
            LENGTHUNIT["metre",1]],
        ID["EPSG",6269]]
ok
Trying:
    crs_utm.coordinate_system
Expecting:
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]]
ok
Trying:
    print(crs_utm.coordinate_operation.to_wkt(pretty=True))
Expecting:
    CONVERSION["UTM zone 15N",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",-93,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9996,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",500000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]],
        ID["EPSG",16015]]
ok
Trying:
    print(crs_utm.to_json(pretty=True))
Expecting:
    {
      "$schema": "https://proj.org/schemas/v0.1/projjson.schema.json",
      "type": "ProjectedCRS",
      "name": "NAD83 / UTM zone 15N",
      "base_crs": {
        "name": "NAD83",
        "datum": {
          "type": "GeodeticReferenceFrame",
          "name": "North American Datum 1983",
          "ellipsoid": {
            "name": "GRS 1980",
            "semi_major_axis": 6378137,
            "inverse_flattening": 298.257222101
          }
        },
        "coordinate_system": {
          "subtype": "ellipsoidal",
          "axis": [
            {
              "name": "Geodetic latitude",
              "abbreviation": "Lat",
              "direction": "north",
              "unit": "degree"
            },
            {
              "name": "Geodetic longitude",
              "abbreviation": "Lon",
              "direction": "east",
              "unit": "degree"
            }
          ]
        },
        "id": {
          "authority": "EPSG",
          "code": 4269
        }
      },
      "conversion": {
        "name": "UTM zone 15N",
        "method": {
          "name": "Transverse Mercator",
          "id": {
            "authority": "EPSG",
            "code": 9807
          }
        },
        "parameters": [
          {
            "name": "Latitude of natural origin",
            "value": 0,
            "unit": "degree",
            "id": {
              "authority": "EPSG",
              "code": 8801
            }
          },
          {
            "name": "Longitude of natural origin",
            "value": -93,
            "unit": "degree",
            "id": {
              "authority": "EPSG",
              "code": 8802
            }
          },
          {
            "name": "Scale factor at natural origin",
            "value": 0.9996,
            "unit": "unity",
            "id": {
              "authority": "EPSG",
              "code": 8805
            }
          },
          {
            "name": "False easting",
            "value": 500000,
            "unit": "metre",
            "id": {
              "authority": "EPSG",
              "code": 8806
            }
          },
          {
            "name": "False northing",
            "value": 0,
            "unit": "metre",
            "id": {
              "authority": "EPSG",
              "code": 8807
            }
          }
        ]
      },
      "coordinate_system": {
        "subtype": "Cartesian",
        "axis": [
          {
            "name": "Easting",
            "abbreviation": "E",
            "direction": "east",
            "unit": "metre"
          },
          {
            "name": "Northing",
            "abbreviation": "N",
            "direction": "north",
            "unit": "metre"
          }
        ]
      },
      "area": "North America - 96°W to 90°W and NAD83 by country",
      "bbox": {
        "south_latitude": 25.61,
        "west_longitude": -96,
        "north_latitude": 84,
        "east_longitude": -90
      },
      "id": {
        "authority": "EPSG",
        "code": 26915
      }
    }
ok
Trying:
    crs = CRS(proj='utm', zone=10, ellps='WGS84')
Expecting nothing
ok
Trying:
    crs.to_proj4()
Expecting:
    '+proj=utm +zone=10 +ellps=WGS84 +units=m +no_defs +type=crs'
ok
Trying:
    print(crs.to_wkt(pretty=True))
Expecting:
    PROJCRS["unknown",
        BASEGEOGCRS["unknown",
            DATUM["Unknown based on WGS84 ellipsoid",
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1],
                    ID["EPSG",7030]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8901]]],
        CONVERSION["UTM zone 10N",
            METHOD["Transverse Mercator",
                ID["EPSG",9807]],
            PARAMETER["Latitude of natural origin",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8801]],
            PARAMETER["Longitude of natural origin",-123,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8802]],
            PARAMETER["Scale factor at natural origin",0.9996,
                SCALEUNIT["unity",1],
                ID["EPSG",8805]],
            PARAMETER["False easting",500000,
                LENGTHUNIT["metre",1],
                ID["EPSG",8806]],
            PARAMETER["False northing",0,
                LENGTHUNIT["metre",1],
                ID["EPSG",8807]],
            ID["EPSG",16010]],
        CS[Cartesian,2],
            AXIS["(E)",east,
                ORDER[1],
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]],
            AXIS["(N)",north,
                ORDER[2],
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]]]
ok
Trying:
    geod = crs.get_geod()
Expecting nothing
ok
Trying:
    "+a={:.0f} +f={:.8f}".format(geod.a, geod.f)
Expecting:
    '+a=6378137 +f=0.00335281'
ok
Trying:
    crs.is_projected
Expecting:
    True
ok
Trying:
    crs.is_geographic
Expecting:
    False
ok
25 items had no tests:
    pyproj.crs
    pyproj.crs.CRS
    pyproj.crs.CRS.__eq__
    pyproj.crs.CRS.__hash__
    pyproj.crs.CRS.__reduce__
    pyproj.crs.CRS.__repr__
    pyproj.crs.CRS.__str__
    pyproj.crs.CRS.from_authority
    pyproj.crs.CRS.from_cf
    pyproj.crs.CRS.from_dict
    pyproj.crs.CRS.from_epsg
    pyproj.crs.CRS.from_json
    pyproj.crs.CRS.from_json_dict
    pyproj.crs.CRS.from_proj4
    pyproj.crs.CRS.from_string
    pyproj.crs.CRS.from_user_input
    pyproj.crs.CRS.from_wkt
    pyproj.crs.CRS.get_geod
    pyproj.crs.CRS.to_cf
    pyproj.crs.CRS.to_dict
    pyproj.crs.CRS.to_string
    pyproj.crs._prepare_from_authority
    pyproj.crs._prepare_from_dict
    pyproj.crs._prepare_from_epsg
    pyproj.crs._prepare_from_string
1 items passed all tests:
  23 tests in pyproj.crs.CRS.__init__
23 tests in 26 items.
23 passed and 0 failed.
Test passed.
Trying:
    from pyproj import Geod
Expecting nothing
ok
Trying:
    gclrk1 = Geod(ellps='clrk66')
Expecting nothing
ok
Trying:
    gclrk2 = Geod(a=6378206.4, b=6356583.8)
Expecting nothing
ok
Trying:
    gclrk1 == gclrk2
Expecting:
    True
ok
Trying:
    gwgs66 = Geod('+ellps=WGS66')
Expecting nothing
ok
Trying:
    gnwl9d = Geod('+ellps=NWL9D')
Expecting nothing
ok
Trying:
    gnwl9d == gwgs66
Expecting:
    True
ok
Trying:
    gclrk1 != gnwl9d  # Clarke 1866 is unlike NWL9D
Expecting:
    True
ok
Trying:
    from pyproj import Geod
Expecting nothing
ok
Trying:
    g = Geod(ellps='clrk66') # Use Clarke 1866 ellipsoid.
Expecting nothing
ok
Trying:
    boston_lat = 42.+(15./60.); boston_lon = -71.-(7./60.)
Expecting nothing
ok
Trying:
    portland_lat = 45.+(31./60.); portland_lon = -123.-(41./60.)
Expecting nothing
ok
Trying:
    newyork_lat = 40.+(47./60.); newyork_lon = -73.-(58./60.)
Expecting nothing
ok
Trying:
    london_lat = 51.+(32./60.); london_lon = -(5./60.)
Expecting nothing
ok
Trying:
    az12,az21,dist = g.inv(boston_lon,boston_lat,portland_lon,portland_lat)
Expecting nothing
ok
Trying:
    "%7.3f %6.3f %12.3f" % (az12,az21,dist)
Expecting:
    '-66.531 75.654  4164192.708'
ok
Trying:
    endlon, endlat, backaz = g.fwd(boston_lon, boston_lat, az12, dist)
Expecting nothing
ok
Trying:
    "%6.3f  %6.3f %13.3f" % (endlat,endlon,backaz)
Expecting:
    '45.517  -123.683        75.654'
ok
Trying:
    lons1 = 3*[newyork_lon]; lats1 = 3*[newyork_lat]
Expecting nothing
ok
Trying:
    lons2 = [boston_lon, portland_lon, london_lon]
Expecting nothing
ok
Trying:
    lats2 = [boston_lat, portland_lat, london_lat]
Expecting nothing
ok
Trying:
    az12,az21,dist = g.inv(lons1,lats1,lons2,lats2)
Expecting nothing
ok
Trying:
    for faz, baz, d in list(zip(az12,az21,dist)):
        "%7.3f %7.3f %9.3f" % (faz, baz, d)
Expecting:
    ' 54.663 -123.448 288303.720'
    '-65.463  79.342 4013037.318'
    ' 51.254 -71.576 5579916.651'
ok
Trying:
    g2 = Geod('+ellps=clrk66') # use proj4 style initialization string
Expecting nothing
ok
Trying:
    az12,az21,dist = g2.inv(boston_lon,boston_lat,portland_lon,portland_lat)
Expecting nothing
ok
Trying:
    "%7.3f %6.3f %12.3f" % (az12,az21,dist)
Expecting:
    '-66.531 75.654  4164192.708'
ok
Trying:
    from pyproj import Geod
Expecting nothing
ok
Trying:
    from shapely.geometry import LineString, Point, Polygon
Expecting nothing
ok
Trying:
    geod = Geod(ellps="WGS84")
Expecting nothing
ok
Trying:
    poly_area, poly_perimeter = geod.geometry_area_perimeter(
        Polygon(
            LineString([
                Point(1, 1), Point(1, 10), Point(10, 10), Point(10, 1)
            ]),
            holes=[LineString([Point(1, 2), Point(3, 4), Point(5, 2)])],
        )
    )
Expecting nothing
ok
Trying:
    "{:.3f} {:.3f}".format(poly_area, poly_perimeter)
Expecting:
    '-944373881400.339 3979008.036'
ok
Trying:
    from pyproj import Geod
Expecting nothing
ok
Trying:
    from shapely.geometry import Point, LineString
Expecting nothing
ok
Trying:
    line_string = LineString([Point(1, 2), Point(3, 4)])
Expecting nothing
ok
Trying:
    geod = Geod(ellps="WGS84")
Expecting nothing
ok
Trying:
    "{:.3f}".format(geod.geometry_length(line_string))
Expecting:
    '313588.397'
ok
Trying:
    from pyproj import Geod
Expecting nothing
ok
Trying:
    geod = Geod('+a=6378137 +f=0.0033528106647475126')
Expecting nothing
ok
Trying:
    lats = [-72.9, -71.9, -74.9, -74.3, -77.5, -77.4, -71.7, -65.9, -65.7,
            -66.6, -66.9, -69.8, -70.0, -71.0, -77.3, -77.9, -74.7]
Expecting nothing
ok
Trying:
    lons = [-74, -102, -102, -131, -163, 163, 172, 140, 113,
            88, 59, 25, -4, -14, -33, -46, -61]
Expecting nothing
ok
Trying:
    total_length = geod.line_length(lons, lats)
Expecting nothing
ok
Trying:
    "{:.3f}".format(total_length)
Expecting:
    '14259605.611'
ok
Trying:
    from pyproj import Geod
Expecting nothing
ok
Trying:
    geod = Geod(ellps="WGS84")
Expecting nothing
ok
Trying:
    lats = [-72.9, -71.9, -74.9]
Expecting nothing
ok
Trying:
    lons = [-74, -102, -102]
Expecting nothing
ok
Trying:
    for line_length in geod.line_lengths(lons, lats):
        "{:.3f}".format(line_length)
Expecting:
    '943065.744'
    '334805.010'
ok
Trying:
    from pyproj import Geod
Expecting nothing
ok
Trying:
    g = Geod(ellps='clrk66') # Use Clarke 1866 ellipsoid.
Expecting nothing
ok
Trying:
    boston_lat = 42.+(15./60.); boston_lon = -71.-(7./60.)
Expecting nothing
ok
Trying:
    portland_lat = 45.+(31./60.); portland_lon = -123.-(41./60.)
Expecting nothing
ok
Trying:
    lonlats = g.npts(boston_lon,boston_lat,portland_lon,portland_lat,10)
Expecting nothing
ok
Trying:
    for lon,lat in lonlats: '%6.3f  %7.3f' % (lat, lon)
Expecting:
    '43.528  -75.414'
    '44.637  -79.883'
    '45.565  -84.512'
    '46.299  -89.279'
    '46.830  -94.156'
    '47.149  -99.112'
    '47.251  -104.106'
    '47.136  -109.100'
    '46.805  -114.051'
    '46.262  -118.924'
ok
Trying:
    import math
Expecting nothing
ok
Trying:
    dg2rad = math.radians(1.)
Expecting nothing
ok
Trying:
    rad2dg = math.degrees(1.)
Expecting nothing
ok
Trying:
    lonlats = g.npts(
       dg2rad*boston_lon,
       dg2rad*boston_lat,
       dg2rad*portland_lon,
       dg2rad*portland_lat,
       10,
       radians=True
    )
Expecting nothing
ok
Trying:
    for lon,lat in lonlats: '%6.3f  %7.3f' % (rad2dg*lat, rad2dg*lon)
Expecting:
    '43.528  -75.414'
    '44.637  -79.883'
    '45.565  -84.512'
    '46.299  -89.279'
    '46.830  -94.156'
    '47.149  -99.112'
    '47.251  -104.106'
    '47.136  -109.100'
    '46.805  -114.051'
    '46.262  -118.924'
ok
Trying:
    from pyproj import Geod
Expecting nothing
ok
Trying:
    geod = Geod('+a=6378137 +f=0.0033528106647475126')
Expecting nothing
ok
Trying:
    lats = [-72.9, -71.9, -74.9, -74.3, -77.5, -77.4, -71.7, -65.9, -65.7,
            -66.6, -66.9, -69.8, -70.0, -71.0, -77.3, -77.9, -74.7]
Expecting nothing
ok
Trying:
    lons = [-74, -102, -102, -131, -163, 163, 172, 140, 113,
            88, 59, 25, -4, -14, -33, -46, -61]
Expecting nothing
ok
Trying:
    poly_area, poly_perimeter = geod.polygon_area_perimeter(lons, lats)
Expecting nothing
ok
Trying:
    "{:.1f} {:.1f}".format(poly_area, poly_perimeter)
Expecting:
    '13376856682207.4 14710425.4'
ok
5 items had no tests:
    pyproj.geod
    pyproj.geod.Geod
    pyproj.geod.Geod.__repr__
    pyproj.geod.Geod.fwd
    pyproj.geod.Geod.inv
8 items passed all tests:
   8 tests in pyproj.geod.Geod.__eq__
  18 tests in pyproj.geod.Geod.__init__
   5 tests in pyproj.geod.Geod.geometry_area_perimeter
   5 tests in pyproj.geod.Geod.geometry_length
   6 tests in pyproj.geod.Geod.line_length
   5 tests in pyproj.geod.Geod.line_lengths
  11 tests in pyproj.geod.Geod.npts
   6 tests in pyproj.geod.Geod.polygon_area_perimeter
64 tests in 13 items.
64 passed and 0 failed.
Test passed.
Trying:
    from pyproj import Transformer
Expecting nothing
ok
Trying:
    transformer = Transformer.from_crs(4326, 2100)
Expecting nothing
ok
Trying:
    points = [(22.95, 40.63), (22.81, 40.53), (23.51, 40.86)]
Expecting nothing
ok
Trying:
    for pt in transformer.itransform(points): '{:.3f} {:.3f}'.format(*pt)
Expecting:
    '2221638.801 2637034.372'
    '2212924.125 2619851.898'
    '2238294.779 2703763.736'
ok
Trying:
    pipeline_str = (
        "+proj=pipeline +step +proj=longlat +ellps=WGS84 "
        "+step +proj=unitconvert +xy_in=rad +xy_out=deg"
    )
Expecting nothing
ok
Trying:
    pipe_trans = Transformer.from_pipeline(pipeline_str)
Expecting nothing
ok
Trying:
    for pt in pipe_trans.itransform([(2.1, 0.001)]):
        '{:.3f} {:.3f}'.format(*pt)
Expecting:
    '120.321 0.057'
ok
Trying:
    transproj = Transformer.from_crs(
        {"proj":'geocent', "ellps":'WGS84', "datum":'WGS84'},
        "EPSG:4326",
        always_xy=True,
    )
Expecting nothing
ok
Trying:
    for pt in transproj.itransform(
        [(-2704026.010, -4253051.810, 3895878.820)],
        radians=True,
    ):
        '{:.3f} {:.3f} {:.3f}'.format(*pt)
Expecting:
    '-2.137 0.661 -20.531'
ok
Trying:
    transprojr = Transformer.from_crs(
        "EPSG:4326",
        {"proj":'geocent', "ellps":'WGS84', "datum":'WGS84'},
        always_xy=True,
    )
Expecting nothing
ok
Trying:
    for pt in transprojr.itransform(
        [(-2.137, 0.661, -20.531)],
        radians=True
    ):
        '{:.3f} {:.3f} {:.3f}'.format(*pt)
Expecting:
    '-2704214.394 -4254414.478 3894270.731'
ok
Trying:
    transproj_eq = Transformer.from_proj(
        'EPSG:4326',
        '+proj=longlat +datum=WGS84 +no_defs +type=crs',
        always_xy=True,
        skip_equivalent=True
    )
Expecting nothing
ok
Trying:
    for pt in transproj_eq.itransform([(-2.137, 0.661)]):
        '{:.3f} {:.3f}'.format(*pt)
Expecting:
    '-2.137 0.661'
ok
Trying:
    from pyproj import Transformer
Expecting nothing
ok
Trying:
    transformer = Transformer.from_crs("epsg:4326", "epsg:3857")
Expecting nothing
ok
Trying:
    x3, y3 = transformer.transform(33, 98)
Expecting nothing
ok
Trying:
    "%.3f  %.3f" % (x3, y3)
Expecting:
    '10909310.098  3895303.963'
ok
Trying:
    pipeline_str = (
        "+proj=pipeline +step +proj=longlat +ellps=WGS84 "
        "+step +proj=unitconvert +xy_in=rad +xy_out=deg"
    )
Expecting nothing
ok
Trying:
    pipe_trans = Transformer.from_pipeline(pipeline_str)
Expecting nothing
ok
Trying:
    xt, yt = pipe_trans.transform(2.1, 0.001)
Expecting nothing
ok
Trying:
    "%.3f  %.3f" % (xt, yt)
Expecting:
    '120.321  0.057'
ok
Trying:
    transproj = Transformer.from_crs(
        {"proj":'geocent', "ellps":'WGS84', "datum":'WGS84'},
        "EPSG:4326",
        always_xy=True,
    )
Expecting nothing
ok
Trying:
    xpj, ypj, zpj = transproj.transform(
        -2704026.010,
        -4253051.810,
        3895878.820,
        radians=True,
    )
Expecting nothing
ok
Trying:
    "%.3f %.3f %.3f" % (xpj, ypj, zpj)
Expecting:
    '-2.137 0.661 -20.531'
ok
Trying:
    transprojr = Transformer.from_crs(
        "EPSG:4326",
        {"proj":'geocent', "ellps":'WGS84', "datum":'WGS84'},
        always_xy=True,
    )
Expecting nothing
ok
Trying:
    xpjr, ypjr, zpjr = transprojr.transform(xpj, ypj, zpj, radians=True)
Expecting nothing
ok
Trying:
    "%.3f %.3f %.3f" % (xpjr, ypjr, zpjr)
Expecting:
    '-2704026.010 -4253051.810 3895878.820'
ok
Trying:
    transformer = Transformer.from_proj("epsg:4326", 4326, skip_equivalent=True)
Expecting nothing
ok
Trying:
    xeq, yeq = transformer.transform(33, 98)
Expecting nothing
ok
Trying:
    "%.0f  %.0f" % (xeq, yeq)
Expecting:
    '33  98'
ok
Trying:
    from pyproj.transformer import TransformerGroup
Expecting nothing
ok
Trying:
    trans_group = TransformerGroup(4326, 2964)
Expecting nothing
ok
Trying:
    trans_group
Expecting:
    <TransformerGroup: best_available=True>
    - transformers: 8
    - unavailable_operations: 1
**********************************************************************
File "X:\Python38\lib\site-packages\pyproj\transformer.py", line 89, in pyproj.transformer.TransformerGroup.__init__
Failed example:
    trans_group
Expected:
    <TransformerGroup: best_available=True>
    - transformers: 8
    - unavailable_operations: 1
Got:
    <TransformerGroup: best_available=True>
    - transformers: 9
    - unavailable_operations: 0
Trying:
    from pyproj import Proj, itransform
Expecting nothing
ok
Trying:
    p1 = Proj('epsg:4326', preserve_units=False)
Expecting nothing
ok
Trying:
    p2 = Proj('epsg:2100', preserve_units=False)
Expecting nothing
ok
Trying:
    points = [(22.95, 40.63), (22.81, 40.53), (23.51, 40.86)]
Expecting nothing
ok
Trying:
    for pt in itransform(p1,p2,points, always_xy=True): '%6.3f %7.3f' % pt
Expecting:
    '411050.470 4497928.574'
    '399060.236 4486978.710'
    '458553.243 4523045.485'
ok
Trying:
    for pt in itransform(4326, 4326, [(30, 60)], skip_equivalent=True):
        '{:.0f} {:.0f}'.format(*pt)
Expecting:
    '30 60'
ok
Trying:
    from pyproj import Proj, transform
Expecting nothing
ok
Trying:
    p1 = Proj('epsg:26915', preserve_units=False)
Expecting nothing
ok
Trying:
    p2 = Proj('epsg:26715', preserve_units=False)
Expecting nothing
ok
Trying:
    x1, y1 = p1(-92.199881,38.56694)
Expecting nothing
ok
Trying:
    x2, y2 = transform(p1,p2,x1,y1)
Expecting nothing
ok
Trying:
    '%9.3f %11.3f' % (x1,y1)
Expecting:
    '569704.566 4269024.671'
ok
Trying:
    '%9.3f %11.3f' % (x2,y2)
Expecting:
    '569722.342 4268814.028'
ok
Trying:
    '%8.3f %5.3f' % p2(x2,y2,inverse=True)
Expecting:
    ' -92.200 38.567'
ok
Trying:
    lats = (38.83,39.32,38.75) # Columbia, KC and StL Missouri
Expecting nothing
ok
Trying:
    lons = (-92.22,-94.72,-90.37)
Expecting nothing
ok
Trying:
    x1, y1 = p1(lons,lats)
Expecting nothing
ok
Trying:
    x2, y2 = transform(p1,p2,x1,y1)
Expecting nothing
ok
Trying:
    xy = x1+y1
Expecting nothing
ok
Trying:
    '%9.3f %9.3f %9.3f %11.3f %11.3f %11.3f' % xy
Expecting:
    '567703.344 351730.944 728553.093 4298200.739 4353698.725 4292319.005'
ok
Trying:
    xy = x2+y2
Expecting nothing
ok
Trying:
    '%9.3f %9.3f %9.3f %11.3f %11.3f %11.3f' % xy
Expecting:
    '567721.149 351747.558 728569.133 4297989.112 4353489.645 4292106.305'
ok
Trying:
    lons, lats = p2(x2,y2,inverse=True)
Expecting nothing
ok
Trying:
    xy = lons+lats
Expecting nothing
ok
Trying:
    '%8.3f %8.3f %8.3f %5.3f %5.3f %5.3f' % xy
Expecting:
    ' -92.220  -94.720  -90.370 38.830 39.320 38.750'
ok
Trying:
    p1 = Proj(proj='latlong',datum='WGS84')
Expecting nothing
ok
Trying:
    x1 = -111.5; y1 = 45.25919444444
Expecting nothing
ok
Trying:
    p2 = Proj(proj="utm",zone=10,datum='NAD27', preserve_units=False)
Expecting nothing
ok
Trying:
    x2, y2 = transform(p1, p2, x1, y1)
Expecting nothing
ok
Trying:
    "%s  %s" % (str(x2)[:9],str(y2)[:9])
Expecting:
    '1402291.0  5076289.5'
**********************************************************************
File "X:\Python38\lib\site-packages\pyproj\transformer.py", line 744, in pyproj.transformer.transform
Failed example:
    "%s  %s" % (str(x2)[:9],str(y2)[:9])
Expected:
    '1402291.0  5076289.5'
Got:
    'inf  inf'
Trying:
    from pyproj import CRS
Expecting nothing
ok
Trying:
    c1 = CRS(proj='latlong',datum='WGS84')
Expecting nothing
ok
Trying:
    x1 = -111.5; y1 = 45.25919444444
Expecting nothing
ok
Trying:
    c2 = CRS(proj="utm",zone=10,datum='NAD27')
Expecting nothing
ok
Trying:
    x2, y2 = transform(c1, c2, x1, y1)
Expecting nothing
ok
Trying:
    "%s  %s" % (str(x2)[:9],str(y2)[:9])
Expecting:
    '1402291.0  5076289.5'
**********************************************************************
File "X:\Python38\lib\site-packages\pyproj\transformer.py", line 751, in pyproj.transformer.transform
Failed example:
    "%s  %s" % (str(x2)[:9],str(y2)[:9])
Expected:
    '1402291.0  5076289.5'
Got:
    'inf  inf'
Trying:
    xeq, yeq = transform(4326, 4326, 30, 60, skip_equivalent=True)
Expecting nothing
ok
Trying:
    "%.0f %.0f" % (xeq, yeq)
Expecting:
    '30 60'
ok
25 items had no tests:
    pyproj.transformer
    pyproj.transformer.Transformer
    pyproj.transformer.Transformer.__init__
    pyproj.transformer.Transformer.__repr__
    pyproj.transformer.Transformer.__str__
    pyproj.transformer.Transformer.accuracy
    pyproj.transformer.Transformer.area_of_use
    pyproj.transformer.Transformer.definition
    pyproj.transformer.Transformer.description
    pyproj.transformer.Transformer.from_crs
    pyproj.transformer.Transformer.from_pipeline
    pyproj.transformer.Transformer.from_proj
    pyproj.transformer.Transformer.has_inverse
    pyproj.transformer.Transformer.name
    pyproj.transformer.Transformer.operations
    pyproj.transformer.Transformer.remarks
    pyproj.transformer.Transformer.scope
    pyproj.transformer.Transformer.to_json
    pyproj.transformer.Transformer.to_json_dict
    pyproj.transformer.Transformer.to_wkt
    pyproj.transformer.TransformerGroup
    pyproj.transformer.TransformerGroup.__repr__
    pyproj.transformer.TransformerGroup.best_available
    pyproj.transformer.TransformerGroup.transformers
    pyproj.transformer.TransformerGroup.unavailable_operations
3 items passed all tests:
  13 tests in pyproj.transformer.Transformer.itransform
  17 tests in pyproj.transformer.Transformer.transform
   6 tests in pyproj.transformer.itransform
**********************************************************************
2 items had failures:
   1 of   3 in pyproj.transformer.TransformerGroup.__init__
   2 of  32 in pyproj.transformer.transform
71 tests in 30 items.
68 passed and 3 failed.
***Test Failed*** 3 failures.
_________________________________________ test_transformer_group__unavailable _________________________________________

    def test_transformer_group__unavailable():
        trans_group = TransformerGroup(4326, 2964)
>       assert len(trans_group.unavailable_operations) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <TransformerGroup: best_available=True>\n- transformers: 9\n- unavailable_operations: 0.unavailable_operations

test\test_transformer.py:520: AssertionError
_________________________________________ test_transform_group__missing_best __________________________________________

    def test_transform_group__missing_best():
        with pytest.warns(DeprecationWarning):
            lat_lon_proj = pyproj.Proj(init="epsg:4326", preserve_units=False)
            alaska_aea_proj = pyproj.Proj(init="epsg:2964", preserve_units=False)

        with pytest.warns(
            UserWarning, match="Best transformation is not available due to missing Grid"
        ):
>           trans_group = pyproj.transformer.TransformerGroup(
                lat_lon_proj.crs, alaska_aea_proj.crs
            )
E           Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) was emitted. The list of emitted warnings is: [].

test\test_transformer.py:537: Failed
=========================================== 4 failed, 321 passed in 21.87s ============================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants