폴리곤 내부

Web/PHP

현 위치에서 좌표 내부에 있는지 판단하는 알고리즘

class Point { public $lat; public $long; function Point($lat, $long) { $this->lat = $lat; $this->long = $long; } } //the Point in Polygon function function pointInPolygon($p, $polygon) { //if you operates with (hundred)thousands of points set_time_limit(60); $c = 0; $p1 = $polygon[0]; $n = count($polygon); for ($i=1; $ilong > min($p1->long, $p2->long) && $p->long long, $p2->long) && $p->lat lat,..

projin
'폴리곤 내부' 태그의 글 목록