8000 GitHub - mad-genius/MrPip: A PHP "point-in-polygon" utility.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mad-genius/MrPip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Mr. Pip

A PHP "point-in-polygon" utility. It’s heavily based on davidkonrad's excellent StackOverflow answer. All I did was condense it down to one class with a static method.

Installation

Just include the class in your code:

include_once 'path/to/class-mg-pip.php';

Usage

$point_in_question = new Point(LAT, LNG);

$polygon = array(
    new Point(LAT, LNG),
    new Point(LAT, LNG),
    new Point(LAT, LNG),
    new Point(LAT, LNG),
    new Point(LAT, LNG),
    new Point(LAT, LNG)
    // etc...
);

Point::point_in_polygon( $point_in_question, $polygon ); // true || false

About

A PHP "point-in-polygon" utility.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0