INPOLY: A fast points-in-polygon test

A fast test to determine point inclusion for general polygonal geometries.
ダウンロード: 13.5K
更新 2020/12/19

INPOLY computes the intersection between a set of points and a general polygonal region in the plane, returning the 'inside', 'outside' and 'boundary' status for each vertex. General non-convex and multiply-connected polygonal regions can be handled. INPOLY is intended as a fast replacement for MATLAB's default INPOLYGON routine.

See POLYDEMO to get started with a set of example problems:

polydemo(1); % a simple example
polydemo(2); % multiply-connected domains
polydemo(3); % speed comparison

INPOLY implements a sorted 'crossing-number' test designed to achieve fast performance for complex inputs. Given a configuration with N points and M polygon edges, INPOLY runs in approximately O((N+M)*LOG(N)) time on average, improving on the O(N*M) scaling of naive implementations.

引用

Darren Engwirda (2024). INPOLY: A fast points-in-polygon test (https://github.com/dengwirda/inpoly), GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2018b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersElementary Polygons についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート
3.0.0.0

Linked to GitHub

2.0.0.0

Major updates, Octave support, bug fixes.

1.0.0.0

Floating point error reduced

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。