Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Alan D. Snow
    @snowman2
    Just seeing this now. There are several options, but in general the idea is to get the polygons in the same projection. Shapely is a good resource for intersects: https://shapely.readthedocs.io/en/latest/manual.html#object.intersects
    If you have many polygons, you could look into https://geopandas.org/ and https://github.com/pygeos/pygeos/
    David Hoese
    @djhoese
    Thanks @snowman2. I think the other satpy developer working on this was using shapely and transforming already. I think the problem was what to do if one of the vertices of the polygon can't be transformed to the other projection.
    Alan D. Snow
    @snowman2
    Ah, I see what you mean. Does the problem occur in both transform directions? Or is it possible to try transforming to the other CRS to see if all points can be transformed?
    David Hoese
    @djhoese
    @snowman2 seems 3.0.0.post1 requires cython to be installed via pip but doesn't list it as a requirement
    Installed /home/docs/checkouts/readthedocs.org/user_builds/pyresample/envs/310/lib/python3.7/site-packages/configobj-5.0.6-py3.7.egg
    Searching for pyproj>=1.9.5.1
    Reading https://pypi.org/simple/pyproj/
    Downloading https://files.pythonhosted.org/packages/17/e5/3f5cdff3e955bcd768cdb0f4236f2d6e022aaa72f57caf7f4d5f552c88fc/pyproj-3.0.0.post1.tar.gz#sha256=a49581629cadd29e61fc061d153a4d62ff28b4063c71fe8ca881eeb98cd22017
    Best match: pyproj 3.0.0.post1
    Processing pyproj-3.0.0.post1.tar.gz
    Writing /tmp/easy_install-7u9_8k61/pyproj-3.0.0.post1/setup.cfg
    Running pyproj-3.0.0.post1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7u9_8k61/pyproj-3.0.0.post1/egg-dist-tmp-91dxe9zi
    error: Setup script exited with ERROR: Cython.Build.cythonize not found. Cython is required to build from a repo.
    if you want a bug report, I can do that
    David Hoese
    @djhoese
    Yann-Sebastien Tremblay-Johnston
    @underchemist
    @snowman2 I'm trying to learn about creating windows wheels and was looking at pyproj as an example. I was expecting like rasterio that external libraries were patched into the wheel, but I don't seem to see any. Is pyproj statically linked to it's sqlite and proj dependencies?
    Alan D. Snow
    @snowman2
    Windows wheels was something I started and never got figured out. Christoph Gohlke has been building them for us. If you are looking at the appveyor builds, those wheels don't work in it's present state.
    Alan D. Snow
    @snowman2
    Yann-Sebastien Tremblay-Johnston
    @underchemist
    @snowman2 I see, thanks for pointing me in the right direction!
    B R S Recht
    @brsr
    I'm on mac os x, trying to make test, and I get this:
    brsr$ make test
    py.test
    ImportError while loading conftest '/Users/brsr/Code/pyproj/test/conftest.py'.
    test/conftest.py:6: in <module>
        import pyproj
    pyproj/__init__.py:49: in <module>
        import pyproj.network
    pyproj/network.py:10: in <module>
        from pyproj._network import (  # noqa: F401
    E   ModuleNotFoundError: No module named 'pyproj._network'
    make: *** [test] Error 4
    Alan D. Snow
    @snowman2
    Did you install pyproj first?
    B R S Recht
    @brsr
    Yes. I can import proj fine if I'm not in the base directory for the pyproj project.
    MacBook:pyproj brsr$ python3
    Python 3.9.0 (default, Oct 27 2020, 14:13:35) 
    [Clang 11.0.0 (clang-1100.0.33.17)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pyproj
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Users/brsr/Code/pyproj/pyproj/__init__.py", line 49, in <module>
        import pyproj.network
      File "/Users/brsr/Code/pyproj/pyproj/network.py", line 10, in <module>
        from pyproj._network import (  # noqa: F401
    ModuleNotFoundError: No module named 'pyproj._network'
    >>> quit()
    MacBook:pyproj brsr$ cd ..
    MacBook:Code brsr$ python3
    Python 3.9.0 (default, Oct 27 2020, 14:13:35) 
    [Clang 11.0.0 (clang-1100.0.33.17)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pyproj
    >>> pyproj.show_versions()
    pyproj info:
        pyproj: 3.0.1.dev0
          PROJ: 7.2.0
      data dir: /usr/local/share/proj
    user_data_dir: /Users/brsr/Library/Application Support/proj
    
    System:
        python: 3.9.0 (default, Oct 27 2020, 14:13:35)  [Clang 11.0.0 (clang-1100.0.33.17)]
    executable: /usr/local/opt/python@3.9/bin/python3.9
       machine: macOS-10.14.6-x86_64-i386-64bit
    
    Python deps:
           pip: 20.2.4
    setuptools: 50.3.2
        Cython: 0.29.21
    Alan D. Snow
    @snowman2
    Are you trying to test the latest pyproj from GitHub or one from pypi?
    B R S Recht
    @brsr
    from Github
    Alan D. Snow
    @snowman2
    How did you install pyproj? Did you run make install-dev?
    B R S Recht
    @brsr
    apparently not because running make install-dev fixed it 😅sorry for the bother
    while i'm here, there's a typo in setup.py, line 218, should say "not found" instead of "not fount". figured i'd just tell you instead of making a one-byte pull request
    hingraham
    @hingraham
    I'm getting errors when attempting to install this through pip install on my AIX machine. Is this compatable with AIX?
    Alan D. Snow
    @snowman2
    I am not familiar with AIX, so not sure. May be worthwhile to provide more details in a GitHub issue.
    mcepl
    @mcepl:matrix.org
    [m]
    When trying package pyproj 3.0.0.post1 for openSUSE, I get crazily high number of failed tests (https://mcepl.fedorapeople.org/tmp/_log.txt) Do I do something wrong, or is the test suite really so broken?
    mcepl
    @mcepl:matrix.org
    [m]
    When trying package pyproj 3.0.0.post1 for openSUSE, I get crazily high number of failed tests (https://mcepl.fedorapeople.org/tmp/_log.txt) Do I do something wrong, or is the test suite really so broken?
    Alan D. Snow
    @snowman2
    Test markers were added to skip network and cli tests: https://github.com/pyproj4/pyproj/blob/master/pytest.ini
    ntubrian
    @ntubrian
    hi dear developers
    I run into a problem when import osmnx
    ModuleNotFoundError: No module named 'pyproj._network'
    this is what i got
    image.png
    my pyproj is latest
    ntubrian
    @ntubrian
    @snowman2 how can I fix thix problem myself
    Alan D. Snow
    @snowman2
    Is it related to: pyproj4/pyproj#770 ?
    David Hoese
    @djhoese

    @snowman2 Any idea why specifying a datum and ellps in a CRS causes PROJ (I assume not pyproj) to remove the datum from the definition:

    In [2]: crs = CRS.from_dict({'proj': 'latlong', 'datum': 'WGS84', 'ellps': 'WGS84', 'a': 6378137.0, 'f': 0.0033528106647474805, 'b': 6356752.314245179, 'no_defs': True})
    
    In [3]: crs.to_dict()
    Out[3]: {'proj': 'longlat', 'ellps': 'WGS84', 'no_defs': None, 'type': 'crs'}

    The a and b and f being removed makes sense to me because it is redundant with ellps, but I would have though the ellps matching the datum definition (the datum uses the WGS84 ellipsoid) would have been redundant but would have kept the datum and dropped the ellps.

    Alan D. Snow
    @snowman2
    I am not entirely sure why.
    HÃ¥vard Thom
    @havardthom
    Is it possible to convert WGS coordinates from DMS (degree, minutes, seconds) to DD (decimal degrees) with pyproj?
    Alan D. Snow
    @snowman2
    There isn't an interface at the moment. But, PROJ does provide that capability. So, it could be added.
    David Hoese
    @djhoese
    @snowman2 With your cartopy PR for pyproj 3.0+ support that was just merged, do I still need to create a cartopy CRS object or can I pass a pyproj CRS object directly to cartopy?
    Though, depending on what you are doing, a ccrs.Projection might be more appropriate.
    I think I misinterpreted the question. For plotting purposes, you need a cartopy CRS. But, it should be much simpler to convert to one using a pyproj CRS.
    David Hoese
    @djhoese
    @snowman2 Yes. The question was "If I have a pyproj CRS, what do I have to do to use it with cartopy" and it seems the answer is pass it to carotpy's CRS object should be good enough
    Sandeep Chauhan
    @sandeepsajan0
    Hi everyone!
    I am getting an issue with pyproj,
    from pyproj import _datadir ImportError: dlopen(/Users/sandeepsajan0/odor_env/lib/python3.8/site-packages/pyproj/_datadir.cpython-38-darwin.so, 2): Symbol not found: _proj_context_destroy
    Actually, I am getting this error on importing geopandas. My OS is mac 11(m1) and I am using python3.8. Can anyone of you please help me with this?