Line 615... |
Line 615... |
615 |
}
|
615 |
}
|
616 |
}
|
616 |
}
|
Line 617... |
Line 617... |
617 |
|
617 |
|
618 |
static function identReferentiel($referentiel, $ligne, $ref_ligne) {
|
618 |
static function identReferentiel($referentiel, $ligne, $ref_ligne) {
|
619 |
// SELECT DISTINCT nom_referentiel, COUNT(id_observation) AS count FROM cel_obs GROUP BY nom_referentiel ORDER BY count DESC;
|
619 |
// SELECT DISTINCT nom_referentiel, COUNT(id_observation) AS count FROM cel_obs GROUP BY nom_referentiel ORDER BY count DESC;
|
620 |
if(strpos($referentiel, 'bdtfx') !== FALSE) return 'bdtfx:v1.01';
|
620 |
if(strpos($referentiel, 'bdtfx') !== FALSE) return 'bdtfx'; //:v1.01';
|
621 |
if(strpos($referentiel, 'bdtxa') !== FALSE) return 'bdtxa:v1.00';
|
621 |
if(strpos($referentiel, 'bdtxa') !== FALSE) return 'bdtxa'; //:v1.00';
|
- |
|
622 |
//if(strpos($referentiel, 'bdnff') !== FALSE) return 'bdnff'; //:4.02';
|
622 |
if(strpos($referentiel, 'bdnff') !== FALSE) return 'bdnff:4.02';
|
623 |
if(strpos($referentiel, 'bdnff') !== FALSE) return 'bdtfx';
|
623 |
if(strpos($referentiel, 'isfan') !== FALSE) return 'isfan:v1.00';
|
624 |
if(strpos($referentiel, 'isfan') !== FALSE) return 'isfan'; //:v1.00';
|
Line 624... |
Line 625... |
624 |
if(strpos($referentiel, 'autre') !== FALSE) return 'autre';
|
625 |
if(strpos($referentiel, 'autre') !== FALSE) return 'autre';
|
625 |
|
626 |
|
626 |
if($referentiel && isset($ligne[C_NOM_SEL]) && $ligne[C_NOM_SEL]) {
|
627 |
if($referentiel && isset($ligne[C_NOM_SEL]) && $ligne[C_NOM_SEL]) {
|
Line 633... |
Line 634... |
633 |
/* TODO: cf story,
|
634 |
/* TODO: cf story,
|
634 |
En cas de NULL faire une seconde passe de détection à partir du nom saisi
|
635 |
En cas de NULL faire une seconde passe de détection à partir du nom saisi
|
635 |
+ accepter les n° de version */
|
636 |
+ accepter les n° de version */
|
636 |
}
|
637 |
}
|
Line 637... |
Line 638... |
637 |
|
638 |
|
638 |
static function traiterLonLat($lon = NULL, $lat = NULL, $referentiel = 'bdtfx:v1.01', $ref_ligne) {
|
639 |
static function traiterLonLat($lon = NULL, $lat = NULL, $referentiel = 'bdtfx', $ref_ligne) {
|
639 |
// en CSV ces valeurs sont des string, avec séparateur en français (","; cf défauts dans ExportXLS)
|
640 |
// en CSV ces valeurs sont des string, avec séparateur en français (","; cf défauts dans ExportXLS)
|
640 |
if($lon && is_string($lon)) $lon = str_replace(',', '.', $lon);
|
641 |
if($lon && is_string($lon)) $lon = str_replace(',', '.', $lon);
|
Line 641... |
Line 642... |
641 |
if($lat && is_string($lat)) $lat = str_replace(',', '.', $lat);
|
642 |
if($lat && is_string($lat)) $lat = str_replace(',', '.', $lat);
|
Line 959... |
Line 960... |
959 |
return $ordered + $array;
|
960 |
return $ordered + $array;
|
960 |
}
|
961 |
}
|
Line 961... |
Line 962... |
961 |
|
962 |
|
962 |
// retourne une BBox [N,S,E,O) pour un référentiel donné
|
963 |
// retourne une BBox [N,S,E,O) pour un référentiel donné
|
963 |
static function getReferentielBBox($referentiel) {
|
964 |
static function getReferentielBBox($referentiel) {
|
964 |
if($referentiel == 'bdtfx:v1.01') return Array(
|
965 |
if($referentiel == 'bdtfx') return Array(
|
965 |
'NORD' => 51.2, // Dunkerque
|
966 |
'NORD' => 51.2, // Dunkerque
|
966 |
'SUD' => 41.3, // Bonifacio
|
967 |
'SUD' => 41.3, // Bonifacio
|
967 |
'EST' => 9.7, // Corse
|
968 |
'EST' => 9.7, // Corse
|
968 |
'OUEST' => -5.2); // Ouessan
|
969 |
'OUEST' => -5.2); // Ouessan
|