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

requires() decorator for libpysal.cg.alpha_shapes #128

Closed
jGaboardi opened this issue Dec 14, 2018 · 1 comment
Closed

requires() decorator for libpysal.cg.alpha_shapes #128

jGaboardi opened this issue Dec 14, 2018 · 1 comment
Assignees
Labels
rough edge Something that's not a bug, but that gets in the way of "it just works."
Milestone

Comments

@jGaboardi
Copy link
Member

Is there a reason not to use the requires('geopandas') decorator for alpha_shape() and alpha_shape_auto(), rather than the following in alpha_geoms()?

    try:
        from shapely.geometry import LineString
        from shapely.ops import polygonize
    except ImportError:
        raise ImportError("Shapely is a required package to use alpha_shapes")

    try:
        from geopandas import GeoSeries
    except ImportError:
        raise ImportError("Geopandas is a required package to use alpha_shapes")

If geopandas is available, then a working install of shapely should also be available. However, to be on the safe side the function could be decorated with requires('geopandas', 'shapely')


  • Platform information:
    posix darwin
    posix.uname_result(sysname='Darwin', nodename='The-Gaboardi.local', release='18.2.0', version='Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64', machine='x86_64')

  • Python version:
    3.6.6 | packaged by conda-forge | (default, Jul 26 2018, 09:55:02)
    [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]

  • SciPy version:
    1.1.0

  • NumPy version:
    1.14.3

@jGaboardi jGaboardi added the rough edge Something that's not a bug, but that gets in the way of "it just works." label Dec 14, 2018
@jGaboardi jGaboardi self-assigned this Oct 6, 2019
@jGaboardi jGaboardi added this to the Next Release milestone Oct 6, 2019
@jGaboardi
Copy link
Member Author

closed via #129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rough edge Something that's not a bug, but that gets in the way of "it just works."
Projects
None yet
Development

No branches or pull requests

1 participant