msurkov16/sb-polygon-pointer
最新稳定版本:1.1.0
Composer 安装命令:
composer require msurkov16/sb-polygon-pointer
包简介
Simple PHP class that provides tools to define is a point (latitude/longitude) is inside the polygon
README 文档
README
Simple PHP class that provides tools to define is a point (latitude/longitude) is inside the polygon
See the example at example.php
Install
Via Composer
$ composer require msurkov16/sb-polygon-pointer
Init custom polygon
$polygonBox = [ [55.761515, 37.600375], [55.759428, 37.651156], [55.737112, 37.649566], [55.737649, 37.597301], ]; $sbPolygonEngine = new sbPolygonEngine($polygonBox);
Checking if point is inside polygon
$isCrosses = $sbPolygonEngine->isCrossesWith(55.746768, 37.625605); // $isCrosses is boolean
Visualization of polygon and provided point to check
$sbPolygonEngine->previewBounds($draw_perpendicular = true, $draw_center_dot = true); // it will return an <img src="src="data:image/jpeg;base64,....">
Change log
Please see CHANGELOG for more information what has changed recently.
Feel free to contribute
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-07