定制 einarsrud/point-in-polygon 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

einarsrud/point-in-polygon

最新稳定版本:v1.0.2

Composer 安装命令:

composer require einarsrud/point-in-polygon

包简介

Point In Polygon

README 文档

README

An implementation of the Winding Number Algorithm. Used to check if a point is inside a polygon.

Installation

Install using Composer

$ composer require einarsrud/point-in-polygon

Usage

// Import the classes
use Raconteur\PointInPolygon\Polygon;
use Raconteur\PointInPolygon\Point;

// Create polygon points
$polygonPoints = [];
$polygonPoints[] = new Point(0, 0);
$polygonPoints[] = new Point(4, 0);
$polygonPoints[] = new Point(2, 4);
$polygonPoints[] = new Point(0, 4);

// Create a Polygon
$polygon = new Polygon($polygonPoints);

// Check if a Point is in a polygon
$pointInPolygon = $polygon->pointInPolygon(new Point(1,1));

统计信息

  • 总下载量: 9.37k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-27