111,6 → 111,7 |
$this->construireWhereNomTaxon(). |
$this->construireWhereDate(). |
$this->construireWhereCommentaire(). |
$this->construireWherePhotosSeulement(). |
$this->construireWhereProjet(). |
$this->construireWhereTag(); |
|
132,6 → 133,7 |
$this->construireWhereNomTaxon(). |
$this->construireWhereDate(). |
$this->construireWhereCommentaire(). |
$this->construireWherePhotosSeulement(). |
$this->construireWhereProjet(). |
$this->construireWhereTag(); |
|
146,7 → 148,7 |
$emplacements = null; |
$concatenation_id = "CONCAT(IFNULL(latitude,''),IFNULL(longitude,''), IFNULL(wgs84_latitude,''),IFNULL(wgs84_longitude,'')) "; |
|
$requete = 'SELECT DISTINCT *, zone_geo AS nom, '. |
$requete = 'SELECT ce_zone_geo, zone_geo, station, '. |
"mots_cles_texte, ". |
"latitude, ". |
"wgs84_latitude, ". |
167,9 → 169,12 |
$this->construireWhereNomTaxon(). |
$this->construireWhereDate(). |
$this->construireWhereCommentaire(). |
$this->construireWherePhotosSeulement(). |
$this->construireWhereProjet(). |
$this->construireWhereTag().' GROUP BY id_coord'; |
|
//echo $requete;exit; |
|
$resultats_emplacements = $this->executerRequete($requete); |
$emplacements = $this->traiterEmplacements($resultats_emplacements, $this->compterObservations($params)); |
return $emplacements; |
200,6 → 205,7 |
$this->construireWhereNomTaxon(). |
$this->construireWhereDate(). |
$this->construireWhereCommentaire(). |
$this->construireWherePhotosSeulement(). |
$this->construireWhereProjet(). |
$this->construireWhereTag(); |
//echo $requete;exit; |
349,7 → 355,7 |
} |
return $sensible; |
} |
|
|
private function communeEstDemandee() { |
$station_infos = $this->decomposerParametreStation(); |
$commune_demandee = true; |
381,6 → 387,7 |
$this->construireWhereNomTaxon(). |
$this->construireWhereDate(). |
$this->construireWhereCommentaire(). |
$this->construireWherePhotosSeulement(). |
$this->construireWhereProjet(). |
$this->construireWhereTag(). |
'ORDER BY nom_sel ASC '. |
532,6 → 539,7 |
$this->construireWhereNomTaxon(). |
$this->construireWhereDate(). |
$this->construireWhereCommentaire(). |
$this->construireWherePhotosSeulement(). |
$this->construireWhereProjet(). |
$this->construireWhereTag(). |
'ORDER BY nom_ret ASC '. |
863,10 → 871,14 |
$lngMax = $ne['lng']; |
|
$sql = "( (latitude != 0 AND longitude != 0) ". |
" AND latitude > $latMin ". |
" AND latitude < $latMax ". |
" AND longitude > $lngMin ". |
" AND longitude < $lngMax )"; |
" AND latitude BETWEEN $latMin AND $latMax ". |
" AND longitude BETWEEN $lngMin AND $lngMax )"; |
|
/*$sql = " MBRWithin(mon_point, GeomFromText('POLYGON((".$latMin.' '.$lngMin.','. |
$latMax.' '.$lngMin.','. |
$latMax.' '.$lngMax.','. |
$latMax.' '.$lngMin.','. |
$latMin.' '.$lngMin."))')) "; */ |
} |
return $sql; |
} |
884,10 → 896,8 |
$lngMax = $ne['lng']; |
|
$sql = "AND wgs84_longitude != 0 AND wgs84_latitude != 0 ". |
" AND wgs84_latitude > $latMin ". |
" AND wgs84_latitude < $latMax ". |
" AND wgs84_longitude > $lngMin ". |
" AND wgs84_longitude < $lngMax "; |
" AND wgs84_latitude BETWEEN $latMin AND $latMax ". |
" AND wgs84_longitude BETWEEN $lngMin AND $lngMax "; |
} |
return $sql; |
} |
905,10 → 915,14 |
$lngMax = $ne['lng']; |
|
$sql = "( wgs84_longitude != 0 AND wgs84_latitude != 0 ". |
" AND wgs84_latitude > $latMin ". |
" AND wgs84_latitude < $latMax ". |
" AND wgs84_longitude > $lngMin ". |
" AND wgs84_longitude < $lngMax )"; |
" AND wgs84_latitude BETWEEN $latMin AND $latMax ". |
" AND wgs84_longitude BETWEEN $lngMin AND $lngMax )"; |
|
/*$sql = " MBRWithin(point_commune, GeomFromText('POLYGON((".$latMin.' '.$lngMin.','. |
$latMax.' '.$lngMin.','. |
$latMax.' '.$lngMax.','. |
$latMax.' '.$lngMin.','. |
$latMin.' '.$lngMin."))')) ";*/ |
} |
return $sql; |
} |
957,6 → 971,15 |
} |
return $sql; |
} |
|
|
private function construireWherePhotosSeulement() { |
$sql = ''; |
if (isset($this->parametres['photos']) && $this->parametres['photos'] == 1) { |
$sql = 'AND co.id_observation IN (SELECT DISTINCT id_observation FROM cel_obs_images) '; |
} |
return $sql; |
} |
|
private function construireWhereUtilisateur() { |
$sql = ''; |
981,7 → 1004,7 |
return $sql; |
} |
|
private function construireWhereProjet() { |
private function construireWhereProjet() { |
$sql = ''; |
// Récupération des coordonnées depuis l'id station |
extract($this->parametres); |