/trunk/services/modules/0.1/sources/FloradataFormateur.php |
---|
75,7 → 75,8 |
$requete = |
"SELECT nom_sel AS taxon, ce_zone_geo, zone_geo, station, 'floradata' AS source, ". |
"IF({$condition}, wgs84_latitude, latitude) AS latitude, IF({$condition}, wgs84_longitude, longitude) ". |
"AS longitude, IF({$condition}, 'COMMUNE', 'STATION') AS type_site ". |
"AS longitude, IF({$condition}, 'commune', 'station') AS type_site, ". |
"CONCAT(prenom_utilisateur, ' ', nom_utilisateur) AS auteur ". |
"FROM cel_obs LEFT JOIN cel_zones_geo cz ON ce_zone_geo=id_zone_geo ". |
"WHERE transmission=1 ". |
$this->construireWhereCoordonneesBbox().' '. |
/trunk/services/modules/0.1/sources/MoissonnageFormateur.php |
---|
65,8 → 65,9 |
final protected function construireRequeteWfs() { |
$requete = |
"SELECT nom_scientifique_complet AS taxon, lieu_station_nom AS nom, lieu_station_latitude AS latitude, ". |
"lieu_station_longitude AS longitude, 'STATION' AS type_site, lieu_commune_code_insee AS code_insee, ". |
"'{$this->nomSource}' AS source FROM {$this->nomSource}_tapir WHERE 1 ". |
"lieu_station_longitude AS longitude, 'station' AS type_site, lieu_commune_code_insee AS code_insee, ". |
"'{$this->nomSource}' AS source, observateur_nom_complet AS auteur ". |
"FROM {$this->nomSource}_tapir WHERE 1 ". |
$this->construireWhereCoordonneesBbox().' '. |
$this->construireWhereNomScientifique().' '. |
"ORDER BY lieu_station_longitude, lieu_station_latitude"; |
/trunk/services/bibliotheque/FormateurWfs.php |
---|
45,14 → 45,16 |
} |
foreach ($stationBdd as $cle => $valeur) { |
if ($cle != 'taxon') { |
if ($cle != 'taxon' && $cle != 'auteur') { |
$station[$cle] = $valeur; |
} |
} |
$station['taxons'] = array(trim($stationBdd['taxon'])); |
$station['auteurs'] = array(trim($stationBdd['auteur'])); |
$this->mettreAJourBbox($station); |
} else { |
$station['taxons'][] = trim($stationBdd['taxon']); |
$station['auteurs'][] = trim($stationBdd['auteur']); |
} |
} |
return $stationsRetour; |
93,7 → 95,8 |
unset($station['station']); |
unset($station['zone_geo']); |
unset($station['ce_zone_geo']); |
$station['taxons'] = str_replace("&", "&", implode(',', $station['taxons'])); |
$station['taxons'] = str_replace("&", "&", implode(', ', $station['taxons'])); |
$station['auteurs'] = str_replace("&", "&", implode(', ', array_unique($station['auteurs']))); |
} |
private function mettreEnPageStationMoissonnage(& $station) { |
106,7 → 109,8 |
} |
} |
unset($station['nom']); |
$station['taxons'] = str_replace("&", "&", implode(',', $station['taxons'])); |
$station['taxons'] = str_replace("&", "&", implode(', ', $station['taxons'])); |
$station['auteurs'] = str_replace("&", "&", implode(', ', array_unique($station['auteurs']))); |
} |
public function formaterException(Exception $erreur) { |
/trunk/services/bibliotheque/squelettes/GetFeature.tpl.xml |
---|
24,6 → 24,7 |
<ms:codeInsee><?=$station['code_insee']?></ms:codeInsee> |
<ms:departement><?=$station['departement']?></ms:departement> |
<ms:taxons><?=$station['taxons']?></ms:taxons> |
<ms:auteurs><?=$station['auteurs']?></ms:auteurs> |
</ms:<?=$station['source']?>> |
</gml:featureMember> |
<?php } ?> |
/trunk/services/bibliotheque/squelettes/DescribeFeatureType.tpl.xml |
---|
20,6 → 20,7 |
<element name="codeInsee" type="string" /> |
<element name="departement" type="string" /> |
<element name="taxons" type="string" /> |
<element name="auteurs" type="string" /> |
</sequence> |
</extension> |
</complexContent> |
/trunk/services/. |
---|
Property changes: |
Added: svn:ignore |
+.htaccess |