@@ -80,26 +80,26 @@ |
||
80 | 80 | return $centroid; |
81 | 81 | } |
82 | 82 | |
83 | - /** |
|
84 | - * Find the outermost point from the centroid |
|
85 | - * |
|
86 | - * @returns Point The outermost point |
|
87 | - */ |
|
83 | + /** |
|
84 | + * Find the outermost point from the centroid |
|
85 | + * |
|
86 | + * @returns Point The outermost point |
|
87 | + */ |
|
88 | 88 | public function outermostPoint() { |
89 | - $centroid = $this->getCentroid(); |
|
89 | + $centroid = $this->getCentroid(); |
|
90 | 90 | |
91 | - $max = array('length' => 0, 'point' => null); |
|
91 | + $max = array('length' => 0, 'point' => null); |
|
92 | 92 | |
93 | - foreach($this->getPoints() as $point) { |
|
94 | - $lineString = new LineString(array($centroid, $point)); |
|
93 | + foreach($this->getPoints() as $point) { |
|
94 | + $lineString = new LineString(array($centroid, $point)); |
|
95 | 95 | |
96 | - if($lineString->length() > $max['length']) { |
|
97 | - $max['length'] = $lineString->length(); |
|
98 | - $max['point'] = $point; |
|
99 | - } |
|
100 | - } |
|
96 | + if($lineString->length() > $max['length']) { |
|
97 | + $max['length'] = $lineString->length(); |
|
98 | + $max['point'] = $point; |
|
99 | + } |
|
100 | + } |
|
101 | 101 | |
102 | - return $max['point']; |
|
102 | + return $max['point']; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | public function exteriorRing() { |
@@ -51,11 +51,11 @@ |
||
51 | 51 | * */ |
52 | 52 | public function invertxy() |
53 | 53 | { |
54 | - for($i=0;$i<count($this->components);$i++) |
|
55 | - { |
|
56 | - if( method_exists($this->components[$i], 'invertxy' ) ) |
|
57 | - $this->components[$i]->invertxy(); |
|
58 | - } |
|
54 | + for($i=0;$i<count($this->components);$i++) |
|
55 | + { |
|
56 | + if( method_exists($this->components[$i], 'invertxy' ) ) |
|
57 | + $this->components[$i]->invertxy(); |
|
58 | + } |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function centroid() { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | // Check to see if this is a 3D point |
35 | 35 | if ($z !== NULL) { |
36 | 36 | if (!is_numeric($z)) { |
37 | - throw new Exception("Cannot construct Point. z should be numeric"); |
|
37 | + throw new Exception("Cannot construct Point. z should be numeric"); |
|
38 | 38 | } |
39 | 39 | $this->dimension = 3; |
40 | 40 | } |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | * */ |
93 | 93 | public function invertxy() |
94 | 94 | { |
95 | - $x=$this->coords[0]; |
|
96 | - $this->coords[0]=$this->coords[1]; |
|
97 | - $this->coords[1]=$x; |
|
95 | + $x=$this->coords[0]; |
|
96 | + $this->coords[0]=$this->coords[1]; |
|
97 | + $this->coords[1]=$x; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 |
@@ -155,7 +155,7 @@ |
||
155 | 155 | private function getBottomLeft($delta = 0) { |
156 | 156 | $lat = $this->result->results[$delta]->geometry->bounds->southwest->lat; |
157 | 157 | $lon = $this->result->results[$delta]->geometry->bounds->southwest->lng; |
158 | - return new Point($lon, $lat); |
|
158 | + return new Point($lon, $lat); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | private function getBottomRight($delta = 0) { |