The invention discloses a method for judging whether a point is in a polygonal area, which comprises a point P (x, y) and a polygonal area formed by a group of vertexes A = {(x1, y1), (x2, y2), (x3, y3)... (xi, yi)...}, and comprises the following steps: (1) calculating vector angles from all vertexes to the point P; (2) calculating the sum of all vector angles; (3) when the sum of the vector angles is smaller than a judgment threshold value, determining that the point P (x, y) is in the polygonal region; otherwise, determining that the point P (x, y) is not in the polygonal area. The scheme is simple in algorithm and high in operation speed, and can be used for quickly judging whether a position is in a designated area.

    本发明公开了一个点是否在多边形区域内的判断方法,包括点P(x,y),以及由一组顶点A={(x,y),(x,y),(x,y)…..(x,y)….}组成的多边形区域,所述的判断方法包括以下步骤:(1)计算所有顶点到点P的向量角度;(2)计算所有向量角度和;(3)当向量角度和小于判断阈值,则点P(x,y)在所述的多边形区域内;否则,点P(x,y)不在所述的多边形区域内。该方案算法简单,运算速度快,可用于快速判断一个位置是否指定区域内。


    Access

    Download


    Export, share and cite



    Title :

    Method for judging whether point is in polygonal area


    Additional title:

    一个点是否在多边形区域内的判断方法


    Contributors:
    LIU YU (author)

    Publication date :

    2020-05-15


    Type of media :

    Patent


    Type of material :

    Electronic Resource


    Language :

    Chinese


    Classification :

    IPC:    G08G Anlagen zur Steuerung, Regelung oder Überwachung des Verkehrs , TRAFFIC CONTROL SYSTEMS / G06F ELECTRIC DIGITAL DATA PROCESSING , Elektrische digitale Datenverarbeitung



    Method for judging whether ship enters dangerous area

    WANG YITAO / LONG FEI / SUN HANG et al. | European Patent Office | 2023

    Free access

    Warning device for judging whether occupant is visually distracted

    TAKAHASHI AKIO / UEDA SHINSUKE | European Patent Office | 2015

    Free access

    Method and system for judging whether aircraft is in safe airspace

    SUI GUOJI / ZHANG SHIHUI / WANG XINGLONG | European Patent Office | 2024

    Free access


    System and method for judging whether motor vehicle illegally occupies emergency lane

    SANG YINGJUN / CHENG DAJIAN / ZHANG SHUO et al. | European Patent Office | 2020

    Free access