Re: [postgis-users] [Win][PostgreSQl 9.2/PostGIS 2.0] Import osm data for beginner

0 views
Skip to first unread message

aGlumLieu

unread,
Oct 17, 2013, 9:16:18 AM10/17/13
to postgi...@lists.osgeo.org
EDIT:

Following the PostgreSQL documentation, i have update the pg_hba.conf file
with "trust" in "method" in order to don't need password.

And it works !

But there is a new Error :

*osm2pgsql SVN version af61cae663 (64bit id space)

release notes: 'Windows version built by Dominik Perpeet
<http://www.customdebug.com/osm2pgsql/index.html>'
Could'nt read EPSG definition <do you have /usr/share/proj/epsg?>*

I'm trying to understand what is this "EPSG definition".

If you have some advices, it would be great smile !
Hello everybody ! :)

I'm trying to import some data from openstreetmap into a postgresql database
since 2 days and I can't manage to do it, that is why I need someone's help
!

I think it is not quite difficult, but I am a great beginner in using
PostgreSQL, PostGIS, osm2pgsql and the windows command prompt.

Here is the situation:

I'm (unfortunately) using Windows 7 (x64). I'have installed PostgreSQL 9.2,
PostGIS 2.0, and osm2pgsql.
My openstreetmap data are rhone-alpes.osm (France).

*PostgreSQL is here:* "C:\Program Files\PostgreSQL\9.2\bin"
*osm2pgsql is here*: "C:\Program Files\osm2pgsql"
*rhone-alpes.osm is here :* C:\aGlumLieu\Geo\rhone-alpes

The name of my PostgreSQL database is *gis*

Here is the problem:

I don't understand how to import those data into my database "gis", even if
i have read many, many tutorials...

I try with this (find on internet):

osm2pgsql –U postgres –m –d gis –E 3857 –S "C:\Program
Files\osm2pgsql\default.style" C:\toto\GeoMkt\rhone-alpes\rhone-alpes.osm

Obviously it does'nt work:

*/osm2pgsql SVN version af61cae663 (64bit id space)

release notes: 'Windows version built by Dominik Perpeet
&lt;http://www.customdebug.com/osm2pgsql/index.html&gt;'
Error: Connection to database failed: fe_sendauth: no password supplied/*

Does someone know the right windows command to do it ?

Have a good day :) !

--
View this message in context: http://postgis.17.x6.nabble.com/Win-PostgreSQl-9-2-PostGIS-2-0-Import-osm-data-for-beginner-tp5004469p5004474.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
_______________________________________________
postgis-users mailing list
postgi...@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

aGlumLieu

unread,
Oct 17, 2013, 4:23:12 AM10/17/13
to postgi...@lists.osgeo.org
Hello everybody ! :)

I'm trying to import some data from openstreetmap into a postgresql database
since 2 days and I can't manage to do it, that is why I need someone's help
!

I think it is not quite difficult, but I am a great beginner in using
PostgreSQL, PostGIS, osm2pgsql and the windows command prompt.

Here is the situation:

I'm (unfortunately) using Windows 7 (x64). I'have installed PostgreSQL 9.2,
PostGIS 2.0, and osm2pgsql.
My openstreetmap data are rhone-alpes.osm (France).

*PostgreSQL is here:* "C:\Program Files\PostgreSQL\9.2\bin"
*osm2pgsql is here*: "C:\Program Files\osm2pgsql"
*rhone-alpes.osm is here :* C:\aGlumLieu\Geo\rhone-alpes

The name of my PostgreSQL database is *gis*

Here is the problem:

I don't understand how to import those data into my database "gis", even if
i have read many, many tutorials...

Does someone know the right windows command to do it ?

Have a good day :) !











--
View this message in context: http://postgis.17.x6.nabble.com/Win-PostgreSQl-9-2-PostGIS-2-0-Import-for-beginner-tp5004469.html

Rémi Cura

unread,
Oct 17, 2013, 10:05:34 AM10/17/13
to PostGIS Users Discussion
Hey/Salut,

osm2pgsql -s -U postgres -d nameofdatabase /file/path/toosm/fileorpbf/name.osm

Ca devrait marcher même si l'utilisation sous win à par l'air d'être idéal.

Bien Cordialement,

Rémi Cura



2013/10/17 aGlumLieu <gbra...@gmail.com>

aGlumLieu

unread,
Oct 18, 2013, 3:29:53 AM10/18/13
to postgi...@lists.osgeo.org
(Salut Rémi, merci pour ton aide ! Je continue mon mail en anglais pour qu'il
puisse concerner tous le monde )

Thank your Remi, but it doesn't work.

First it was because of I missed to mention the .style file folder.

So, that currently the last windows command I have:

*osm2pgsql -s -U postgres -d osm -S "/Program Files/osm2pgsql/default.style"
/aGlumLieu/GeoMkt/rhone-alpes/rhone-alpes.osm*

But I have a new problem:

*osm2pgsql SVN version af61cae663 (64bit id space)

release notes: 'Windows version built by Dominik Perpeet
<http://www.customdebug.com/osm2pgsql/index.html>'

Using projection SRS 900913 (Spherical Mercator)
Error reading style file line 151 (fields=4)
flag 'phstore' is invalid in non-hstore mode
Error occured, cleaning up*

In the default.style file, in line 151, there are

/# Area tags
# We don't make columns for these tags, but objects with them are areas.
# Mainly for use with hstore
way abandoned:aeroway text phstore
way abandoned:amenity text phstore
way abandoned:building text phstore
way abandoned:landuse text phstore
way abandoned:power text phstore
way area:highway text phstore/

I don't know what I have to do...


--
View this message in context: http://postgis.17.x6.nabble.com/Win-PostgreSQl-9-2-PostGIS-2-0-Import-osm-data-for-beginner-tp5004469p5004478.html

Rémi Cura

unread,
Oct 18, 2013, 4:20:05 AM10/18/13
to PostGIS Users Discussion
I never used osm data so it's a guess !

solution 1 :
install hstore :  in postgres, CREATE EXTENSION hstore;

solution 2 : comment lines creating problems (with phstore),
to comment ad a # at the beginning of the line

Cheers,
Rémi-C


2013/10/18 aGlumLieu <gbra...@gmail.com>

aGlumLieu

unread,
Oct 18, 2013, 4:42:22 AM10/18/13
to postgi...@lists.osgeo.org
Hello,

I have updated my last post ;)

I have already try this two solutions but there is the same error for both
of them:

(failed: ERREUR: la colonne population est spécifiée plus d'une fois)

*failed: ERROR: the population column is specified more than once*

I have found some things on teh internet about a miss of the population
column, but nothing about more thance one..

--
View this message in context: http://postgis.17.x6.nabble.com/Win-PostgreSQl-9-2-PostGIS-2-0-Import-osm-data-for-beginner-tp5004469p5004480.html

Rémi Cura

unread,
Oct 18, 2013, 4:52:20 AM10/18/13
to PostGIS Users Discussion
Are you sure you have the latest style file :




2013/10/18 aGlumLieu <gbra...@gmail.com>

Rémi Cura

unread,
Oct 18, 2013, 4:53:15 AM10/18/13
to PostGIS Users Discussion
Damn gmail : mail was fired too soon.


I see "population" only once in it.
Cheers, 
Rémi-C


2013/10/18 Rémi Cura <remi...@gmail.com>

aGlumLieu

unread,
Oct 18, 2013, 5:20:40 AM10/18/13
to postgi...@lists.osgeo.org
I love you !!!!

"Population" was mentionned two times !

I have load my data in PostgreSQL successfully !!!! (One week just to import
data :p)

Merci mille fois :) !



--
View this message in context: http://postgis.17.x6.nabble.com/Win-PostgreSQl-9-2-PostGIS-2-0-Import-osm-data-for-beginner-tp5004469p5004483.html

Rémi Cura

unread,
Oct 18, 2013, 5:31:11 AM10/18/13
to PostGIS Users Discussion
pas de pb,

te décourage pas la courbe d'apprentissage est plutôt exponentielle.
S'occuper des données est toujours le plus long en plus !

Your welcome, 
good luck with data processing ;-)

Rémi-C




2013/10/18 aGlumLieu <gbra...@gmail.com>
Reply all
Reply to author
Forward
0 new messages