Cela provient du fait que le SRID 900913 n'est pas dans le fichier
spatial_ref_sys (c'est normal).
Tu peux faire :
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 900913, 'sr-org', 6, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m
+nadgrids=@null +wktext +no_defs', 'PROJCS["unnamed",GEOGCS["unnamed
ellipse",DATUM["unknown",SPHEROID["unnamed",6378137,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Mercator_2SP"],PARAMETER["standard_parallel_1",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],EXTENSION["PROJ4","+proj=merc
+a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"]]');
Ou suivre cette procédure:
https://github.com/springmeyer/win-osm-workshop/blob/master/Tutorial.md#step-6-configure-the-osm-postgis-database
A.
On 13-05-24 11:25 AM, Ista Pouss wrote:
Ça y est, j'ai exécuté toutes tes commandes impecable, mais ça n'a
rien changé pour
l'osm2pgsql !
/home/herve> osm2pgsql -s -U fr -d osm datas1.osm
osm2pgsql SVN version 0.80.0 (32bit id space)
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE: table "planet_osm_point" does not exist, skipping
NOTICE: table "planet_osm_point_tmp" does not exist, skipping
SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 );
failed: ERROR: AddGeometryColumns() - invalid SRID
CONTEXT: SQL statement "SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5)"
PL/pgSQL function "addgeometrycolumn" line 5 at SQL statement
Le 24 mai 2013 15:24, Arnaud Vandecasteele <arnaud....@gmail.com
<mailto:arnaud....@gmail.com>> a écrit :
Ben le path vers postgis.sql :)
Tu peux faire un "locate postgis.sql" pour trouver ton fichier.
Le mien est dans :
/usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql
Pour le plpgsql, il devait être installé dans ton template d'origine.
A.
On 13-05-24 10:50 AM, Ista Pouss wrote:
Hoooo grand sorcier tout se passe bien, mais...
Le 24 mai 2013 14:22, Arnaud Vandecasteele <arnaud....@gmail.com
<mailto:arnaud....@gmail.com>> a écrit :
Ensuite le mieux c'est de te faire un template géographique
(une sorte de base de données qui servira de modèle).
Puis tu utilises celle-la pour chaque nouvelle base de
données géographiques :
createdb -E UTF8 template_postgis
createlang -d template_postgis plpgsql
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE
datname='template_postgis';"
psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
$ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
/postgis.sql: Aucun fichier ou dossier de ce type
... c'est à cause que $POSTGIS_SQL_PATH n'existe pas sur mon
poste j'imagine, mais quelle valeur faut-il lui donner ?
J'ai également eu une petite péripétie :
$ createlang -d template_postgis plpgsql
createlang: language "plpgsql" is already installed in database
"template_postgis"
... j'imagine que c'est un reliquat d'ailleurs.
Merci en tous les cas.
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
A.
_______________________________________________
dev-fr mailing list
dev-fr@openstreetmap.org <mailto:dev-fr@openstreetmap.org>
http://lists.openstreetmap.org/listinfo/dev-fr
--
--------------------------------------------------------------------
Arnaud Vandecasteele
SIG - WebMapping - Spatial Ontology - GeoCollaboration
Web Site
http://geotribu.net/
_______________________________________________
dev-fr mailing list
dev-fr@openstreetmap.org <mailto:dev-fr@openstreetmap.org>
http://lists.openstreetmap.org/listinfo/dev-fr
--
Les dérives de rue :
Profession émotion <http://drivrsdu.fr/profession-emotion/>
_______________________________________________
dev-fr mailing list
dev-fr@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev-fr
--
--------------------------------------------------------------------
Arnaud Vandecasteele
SIG - WebMapping - Spatial Ontology - GeoCollaboration
Web Site
http://geotribu.net/
_______________________________________________
dev-fr mailing list
dev-fr@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev-fr