Subversion Repositories eFlore/Applications.moissonnage

Rev

Rev 26 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
26 alex 1
<?php
2
 
3
class Maille {
4
 
5
	private $latitudeSud;
6
	private $longitudeOuest;
7
	private $latitudeNord;
8
	private $longitudeEst;
9
	private $indexLatitude;
10
	private $indexLongitude;
11
 
12
	private $points = array();
31 alex 13
	private $nombrePoints;
14
	private $observations = array();
15
	private $nombreObservations;
26 alex 16
 
17
 
18
	public function __construct($sud, $ouest, $nord, $est, $indexLat, $indexLng) {
19
		$this->latitudeSud = $sud;
20
		$this->longitudeOuest = $ouest;
21
		$this->latitudeNord = $nord;
22
		$this->longitudeEst = $est;
23
		$this->indexLatitude = $indexLat;
24
		$this->indexLongitude = $indexLng;
25
	}
26
 
31 alex 27
	public function ajouterPoint($point) {
26 alex 28
		$this->points[] = $point;
29
		$this->nombrePoints ++;
31 alex 30
		$this->observations[] = $point['observations'];
31
		$this->nombreObservations += $point['observations'];
26 alex 32
	}
33
 
34
	public function getLatitudeNord() {
35
		return $this->latitudeNord;
36
	}
37
 
38
	public function getLongitudeOuest() {
39
		return $this->longitudeOuest;
40
	}
41
 
42
	public function getLatitudeSud() {
43
		return $this->latitudeSud;
44
	}
45
 
46
	public function getLongitudeEst() {
47
		return $this->longitudeEst;
48
	}
49
 
50
	public function getIndexLatitude() {
51
		return $this->indexLatitude;
52
	}
53
 
54
	public function getIndexLongitude() {
55
		return $this->indexLongitude;
56
	}
57
 
31 alex 58
	public function getPoints() {
59
		return $this->points;
60
	}
61
 
26 alex 62
	public function getNombrePoints() {
63
		return $this->nombrePoints;
64
	}
65
 
31 alex 66
	public function getObservations() {
67
		return $this->observations;
26 alex 68
	}
69
 
31 alex 70
	public function getNombreObservations() {
71
		return $this->nombreObservations;
72
	}
73
 
26 alex 74
	public function totalNonNul() {
31 alex 75
		return count($this->points) > 0;
26 alex 76
	}
77
 
31 alex 78
	public function combinerMailles(& $maille) {
79
		$this->nombrePoints += $maille->nombre_sites;
80
		$this->nombreObservations += $maille->nombre_observations;
81
	}
82
 
26 alex 83
}
84
 
85
?>