Skip to content

Commit

Permalink
Fixed #33 - Bug fix - correction export SIG vide
Browse files Browse the repository at this point in the history
  • Loading branch information
gildeluermoz committed Dec 15, 2014
1 parent 7e9b1db commit 46c9d8f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/backend/modules/synthese/actions/actions.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,19 @@ public function executeShp(sfRequest $request)
//pour les points
$sql = SynthesefauneTable::listShp($params,'ST_Point'); // exécution de la requête sql
//construction de la ligne de commande ogr2ogr
$ogr = 'ogr2ogr -s_srs EPSG:'.$srid_local_export.' -f "ESRI Shapefile" /var/www/localhost/private/trunk/faune/web/exportshape/faune_synthese_'.$madate.'_points.shp PG:"host=localhost user=cartopne dbname=appli_faune password=AmaZone973" -sql ';
$ogr = 'ogr2ogr -s_srs EPSG:'.$srid_local_export.' -f "ESRI Shapefile" '.sfConfig::get('sf_web_dir').'/exportshape/faune_synthese_'.$madate.'_points.shp PG:"host=databases user=cartopnx dbname=synthese password=monpassachanger" -sql ';
$command = $ogr." \"".$sql."\"";
system($command);//execution de la commande
//pour les mailles
$sql = SynthesefauneTable::listShp($params,'ST_Polygon'); // exécution de la requête sql
//construction de la ligne de commande ogr2ogr
$ogr = 'ogr2ogr -s_srs EPSG:'.$srid_local_export.' -f "ESRI Shapefile" /var/www/localhost/private/trunk/faune/web/exportshape/faune_synthese_'.$madate.'_mailles.shp PG:"host=localhost user=cartopne dbname=appli_faune password=AmaZone973" -sql ';
$ogr = 'ogr2ogr -s_srs EPSG:'.$srid_local_export.' -f "ESRI Shapefile" '.sfConfig::get('sf_web_dir').'/exportshape/faune_synthese_'.$madate.'_mailles.shp PG:"host=databases user=cartopnx dbname=synthese password=monpassachanger" -sql ';
$command = $ogr." \"".$sql."\"";
system($command);//execution de la commande
//pour les centroids
$sql = SynthesefauneTable::listShp($params,'centroid'); // exécution de la requête sql
//construction de la ligne de commande ogr2ogr
$ogr = 'ogr2ogr -s_srs EPSG:'.$srid_local_export.' -f "ESRI Shapefile" /var/www/localhost/private/trunk/faune/web/exportshape/faune_synthese_'.$madate.'_centroids.shp PG:"host=localhost user=cartopne dbname=appli_faune password=AmaZone973" -sql ';
$ogr = 'ogr2ogr -s_srs EPSG:'.$srid_local_export.' -f "ESRI Shapefile" '.sfConfig::get('sf_web_dir').'/exportshape/faune_synthese_'.$madate.'_centroids.shp PG:"host=databases user=cartopnx dbname=synthese password=monpassachanger" -sql ';
$command = $ogr." \"".$sql."\"";
system($command);//execution de la commande
//on zipe le tout
Expand Down
2 changes: 2 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Installation de l'application
chmod -R 777 /home/synthese/dev/FF-synthese/log
chmod -R 777 /home/synthese/dev/FF-synthese/cache
chmod -R 775 /home/synthese/dev/FF-synthese/web/exportshape/
chmod -R 775 /home/synthese/dev/FF-synthese/web/uploads/shapes
* Créer les fichiers de configurations

Expand Down
2 changes: 1 addition & 1 deletion lib/sfSyntheseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class sfSyntheseConfig extends sfActions
//Ce srid est utilisé dans les exports.
//Lorsque la base de données est créée avec les scripts sql fournis (synthese_srid.sql), il faut choisir le script correspondant à la valeur portée ci-dessous.
//Idem pour le script d'insertion des données (synthese_data_srid.sql)
//ATTENTION. Il faut mettre à jour le service wms interne de l'application qui utilise ce script. Fichier /var/www/localhost/private/trunk/synthesepn/wms/faune.map
//ATTENTION. Il faut mettre à jour le service wms interne de l'application qui utilise ce script. Fichier ..FF-synthese/wms/faune.map
public static $srid_local = 2154;


Expand Down

1 comment on commit 46c9d8f

@gildeluermoz
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En fait on fix le #32 !!!

Please sign in to comment.