Skip to content

joe223/Point-Inclusion-in-Polygon-Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Points in Polygon test

可用于测试某一坐标点是否在国内(使用百度地图,example/index.html可用于绘制 polygon)。 The point-in-polygon (PIP) problem asks whether a given point in the plane lies inside or outside a polygon.

Install

$ npm install piptest

Usage

let arr = [
    {
        lat: 11,
        lng: 21
    },
    {
        lat: 12,
        lng: 22
    },
    {
        lat: 13,
        lng: 23
    },
    {
        lat: 31,
        lng: 31
    }
]
let piptest = new PIPtest( arr );
let result = piptest.test({
    lat: 31,
    lng: 31
}); // Boolean

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published