inpoly-cython


Nameinpoly-cython JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/inpoly_cython
Summaryinpoly-cython / Original: https://github.com/dengwirda/inpoly-python
upload_time2023-01-04 04:40:21
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMPL
keywords polygon intersect
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<h2>inpoly-cython / Original: https://github.com/dengwirda/inpoly-python</h2>



```python



$pip install inpoly-cython



Project from: https://github.com/dengwirda/inpoly-python

I only added the automatic compilation of the fast kernels: https://github.com/dengwirda/inpoly-python#fast-kernels





License Terms (from https://github.com/dengwirda/inpoly-python)

This program may be freely redistributed under the condition that the copyright notices (including this entire header) are not removed, and no compensation is received through use of the software. Private, research, and institutional use is free. You may distribute modified versions of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution of this code as part of a commercial system is permissible ONLY BY DIRECT ARRANGEMENT WITH THE AUTHOR. (If you are not directly supplying this code to a customer, and you are instead telling them how they can obtain it for free, then you are not required to make any arrangement with me.)



DISCLAIMER: Neither I nor the University of Sydney warrant this code in any way whatsoever. This code is provided "as-is" to be used at your own risk.



Example: 



from inpoly_cython import inpoly2

import numpy as np

    

xmin, xmax, ymin, ymax = 0, 1, 0, 1

x0, y0, x1, y1 = 0.5, 0.5, 0, 1



#define any n-sided polygon

p = np.array([[xmin, ymin],

              [xmax, ymin],

              [xmax, ymax],

              [xmin, ymax],

              [xmin, ymin]])



#define some coords

coords = np.array([[x0, y0],

                   [x1, y1]])



#get boolean mask for points if in or on polygon perimeter

isin, ison = inpoly2(coords, p)





```






            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/inpoly_cython",
    "name": "inpoly-cython",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "polygon,intersect",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bc/80/fdbcacbb712a184389ffea8a990a51e77ce814fe63967dd93f3623ed28c0/inpoly_cython-0.10.tar.gz",
    "platform": null,
    "description": "\n<h2>inpoly-cython / Original: https://github.com/dengwirda/inpoly-python</h2>\n\n\n\n```python\n\n\n\n$pip install inpoly-cython\n\n\n\nProject from: https://github.com/dengwirda/inpoly-python\n\nI only added the automatic compilation of the fast kernels: https://github.com/dengwirda/inpoly-python#fast-kernels\n\n\n\n\n\nLicense Terms (from https://github.com/dengwirda/inpoly-python)\n\nThis program may be freely redistributed under the condition that the copyright notices (including this entire header) are not removed, and no compensation is received through use of the software. Private, research, and institutional use is free. You may distribute modified versions of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution of this code as part of a commercial system is permissible ONLY BY DIRECT ARRANGEMENT WITH THE AUTHOR. (If you are not directly supplying this code to a customer, and you are instead telling them how they can obtain it for free, then you are not required to make any arrangement with me.)\n\n\n\nDISCLAIMER: Neither I nor the University of Sydney warrant this code in any way whatsoever. This code is provided \"as-is\" to be used at your own risk.\n\n\n\nExample: \n\n\n\nfrom inpoly_cython import inpoly2\n\nimport numpy as np\n\n    \n\nxmin, xmax, ymin, ymax = 0, 1, 0, 1\n\nx0, y0, x1, y1 = 0.5, 0.5, 0, 1\n\n\n\n#define any n-sided polygon\n\np = np.array([[xmin, ymin],\n\n              [xmax, ymin],\n\n              [xmax, ymax],\n\n              [xmin, ymax],\n\n              [xmin, ymin]])\n\n\n\n#define some coords\n\ncoords = np.array([[x0, y0],\n\n                   [x1, y1]])\n\n\n\n#get boolean mask for points if in or on polygon perimeter\n\nisin, ison = inpoly2(coords, p)\n\n\n\n\n\n```\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MPL",
    "summary": "inpoly-cython / Original: https://github.com/dengwirda/inpoly-python",
    "version": "0.10",
    "split_keywords": [
        "polygon",
        "intersect"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef5735f60cc2bf2ec9fe8c168b393f46767816b613b528e4c335f766fa53b323",
                "md5": "9a7553236335c35a73e5565be5e782bd",
                "sha256": "06e3af7e28f42a0066028e7eac0cb39488638a602b884476d9ebe5dacdfa2a58"
            },
            "downloads": -1,
            "filename": "inpoly_cython-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9a7553236335c35a73e5565be5e782bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14654,
            "upload_time": "2023-01-04T04:40:19",
            "upload_time_iso_8601": "2023-01-04T04:40:19.613356Z",
            "url": "https://files.pythonhosted.org/packages/ef/57/35f60cc2bf2ec9fe8c168b393f46767816b613b528e4c335f766fa53b323/inpoly_cython-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc80fdbcacbb712a184389ffea8a990a51e77ce814fe63967dd93f3623ed28c0",
                "md5": "4d920ebc5f8ef305ac32f81f46db2c2b",
                "sha256": "ff145cdc3348242f03929effc02a3e711f18b80a234b93f5c529caf55b5f6dbc"
            },
            "downloads": -1,
            "filename": "inpoly_cython-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "4d920ebc5f8ef305ac32f81f46db2c2b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12406,
            "upload_time": "2023-01-04T04:40:21",
            "upload_time_iso_8601": "2023-01-04T04:40:21.481193Z",
            "url": "https://files.pythonhosted.org/packages/bc/80/fdbcacbb712a184389ffea8a990a51e77ce814fe63967dd93f3623ed28c0/inpoly_cython-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-04 04:40:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hansalemaos",
    "github_project": "inpoly_cython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "inpoly-cython"
}
        
Elapsed time: 0.02502s