Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site. Si vous continuez à utiliser ce dernier, nous considèrerons que vous acceptez l'utilisation des cookies. J'ai compris ! ou En savoir plus !.
banniere

Le portail francophone de la géomatique


Toujours pas inscrit ? Mot de passe oublié ?

Ceci est une ancienne révision du document !



Strict Standards: Declaration of syntax_plugin_tag_topic::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/tag/syntax/topic.php on line 123

Strict Standards: Declaration of syntax_plugin_tag_topic::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/tag/syntax/topic.php on line 123

Strict Standards: Declaration of syntax_plugin_tag_searchtags::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/tag/syntax/searchtags.php on line 280

Strict Standards: Declaration of syntax_plugin_tag_searchtags::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/tag/syntax/searchtags.php on line 280

Strict Standards: Declaration of syntax_plugin_tag_tag::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/tag/syntax/tag.php on line 118

Strict Standards: Declaration of syntax_plugin_tag_tag::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/tag/syntax/tag.php on line 118

Strict Standards: Declaration of syntax_plugin_tag_count::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/tag/syntax/count.php on line 130

Strict Standards: Declaration of syntax_plugin_tag_count::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/tag/syntax/count.php on line 130

Strict Standards: Declaration of syntax_plugin_tag_tagpage::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/tag/syntax/tagpage.php on line 96

Strict Standards: Declaration of syntax_plugin_tag_tagpage::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/tag/syntax/tagpage.php on line 96

Strict Standards: Declaration of syntax_plugin_clearfloat::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/clearfloat/syntax.php on line 74

Strict Standards: Declaration of syntax_plugin_clearfloat::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/clearfloat/syntax.php on line 74

Strict Standards: Declaration of syntax_plugin_pageindex::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/pageindex/syntax.php on line 187

Strict Standards: Declaration of syntax_plugin_pageindex::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/pageindex/syntax.php on line 187

Strict Standards: Declaration of syntax_plugin_googlemaps_googlemap::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/googlemaps/syntax/googlemap.php on line 169

Strict Standards: Declaration of syntax_plugin_googlemaps_googlemap::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/googlemaps/syntax/googlemap.php on line 169

Strict Standards: Declaration of syntax_plugin_nextpage::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/nextpage/syntax.php on line 69

Strict Standards: Declaration of syntax_plugin_nextpage::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/nextpage/syntax.php on line 69

Strict Standards: Declaration of syntax_plugin_include::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/web/wiki/lib/plugins/include/syntax.php on line 137

Strict Standards: Declaration of syntax_plugin_include::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/web/wiki/lib/plugins/include/syntax.php on line 137
Plugin installed incorrectly. Rename plugin directory 'backlinks.old' to 'backlinks'.

Accueil : Wiki GeoRezo | Les logiciels en géomatique | Postgis | Scripts utiles

Scripts Postgis

Import de données

Gérer l'encodage lors de l'import

Il existe plusieurs moyens de gérer l'encodage d'un fichier lors de l'import de données dans PostGreSQL.

  • Géré à partir de shp2pgsql :
shp2pgsql -W latin1 fichier.shp maTable | psql madatabase
  • Géré à partir de psql (non testé) :
psql -v ENCODING=utf8 ou latin1
  • Géré à la volé avec la commande iconv :
 shp2pgsql fichier.shp maTable |iconv -f LATIN1 -t UTF-8 |psql maDatabase
  • Géré dans la base de données :
createdb mabase -E latin1
  • Modifier la configuration du serveur dans postgresql.conf :
client_encoding

Export de données

Export de toutes les tables géographiques (batch unix):

#!/bin/bash
MA_BASE=$0
 
psql -c "SELECT f_table_name FROM geometry_columns" -A -t -F " " $MA_BASE | awk '{ print $1; }' | while read TABLE
do
 
  shp2pgsql $MA_BASE $TABLE -f $TABLE.shp
 
done

./nomScript.sh <nomBase>

Récupérer la liste des procédures

SELECT proname FROM pg_proc;

Plus d'information sur cette table système pg_proc, ici

Récupérer le code SQL d'une procédure

SELECT proname,prosrc,probin FROM pg_proc WHERE proname='<nomProcédure>';

Avec <nomProcédure>, le nom de la procédure.

Plus d'information sur cette table système pg_proc, ici

 
main/logiciels/postgis/scripts.1238864792.txt.gz · Dernière modification: 2009/04/15 20:57 (modification externe)
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki