Can't import data via imposm

492 views
Skip to first unread message

Andrey Maraev

unread,
Feb 5, 2013, 9:13:47 AM2/5/13
to imp...@googlegroups.com
Hello there!
I try to start imposm on RHEL x86_64& Python2.6 but get the error like this:
  http://pastebin.com/qYM8bVQ7 after that when I try to exit from the programm process (Ctrl+C) I get this:
any advices?
P.S>Postgres9.1\Postgis1.5


--
lernen,lernen und lernen

Andrey Maraev

unread,
Feb 5, 2013, 9:37:38 AM2/5/13
to imp...@googlegroups.com
OK! It seems to be in my user permissions. I've fixed it, but now I see this:

Enabling Shapely speedups.
password for postgres at localhost:
[22:37:55] ## reading /opt/maps/berlin/berlin.osm.pbf
[22:37:55] coords: 1776k nodes: 35k ways: 253k relations: 1k (estimated)
[22:38:20] coords: 1713k nodes: 13k ways: 318k relations: 2k
[22:38:21] reading took 25s
Traceback (most recent call last):
  File "/venv26/bin/imposm", line 8, in <module>
    load_entry_point('imposm==2.5.0', 'console_scripts', 'imposm')()
  File "/venv26/lib/python2.6/site-packages/imposm/app.py", line 257, in main
    db = DB(db_conf)
  File "/venv26/lib/python2.6/site-packages/imposm/db/config.py", line 25, in DB
    return PostGISDB(db_conf)
  File "/venv26/lib/python2.6/site-packages/imposm/db/postgis.py", line 42, in __init__
    if self.is_postgis_2():
  File "/venv26/lib/python2.6/site-packages/imposm/db/postgis.py", line 57, in is_postgis_2
    cur.execute('SELECT postgis_version()')
psycopg2.ProgrammingError: function postgis_version() does not exist
LINE 1: SELECT postgis_version()
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

What am I doing wrong?

2013/2/5 Andrey Maraev <asma...@gmail.com>



--
lernen,lernen und lernen

Andrey Maraev

unread,
Feb 6, 2013, 2:19:53 AM2/6/13
to imp...@googlegroups.com
It seems to work for me now. I added some tables in the osm database. So thereby
 If someone would be there please let me advice what is better for using of imposm schema: 
 1) first -osm2pgsql then osm2pgsql-to-imposm-schema.sql
 2) or just --imposm --read--write --optimize
Thanks All! 

2013/2/5 Andrey Maraev <asma...@gmail.com>



--
lernen,lernen und lernen

Oliver Tonnhofer

unread,
Feb 11, 2013, 5:02:51 AM2/11/13
to imp...@googlegroups.com

On 06.02.2013, at 08:19, Andrey Maraev wrote:

> It seems to work for me now. I added some tables in the osm database. So thereby
> If someone would be there please let me advice what is better for using of imposm schema:
> 1) first -osm2pgsql then osm2pgsql-to-imposm-schema.sql
> 2) or just --imposm --read--write --optimize


osm2pgsql-to-imposm-schema.sql was developed by some folks that need to use Windows and Imposm doesn't run on Windows. You should use Imposm, if you are able to run it.


The error "psycopg2.ProgrammingError: function postgis_version() does not exist
LINE 1: SELECT postgis_version()" suggests that you did not initialize the database for PostGIS. See:
http://imposm.org/docs/imposm/latest/tutorial.html#create-database


Regards,
Oliver

--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
http://mapproxy.org | https://github.com/olt | @oltonn







Sithila Konara

unread,
Sep 8, 2014, 11:42:03 PM9/8/14
to imp...@googlegroups.com
Hi,

I have faced to same situation. i'm using postgresql9.3 and postgis 2.1. Can any one tell me how to fix it? I tried imposm tutorial, but ended with same result

Here's my error log


Traceback (most recent call last):
  File "/usr/bin/imposm", line 9, in <module>

    load_entry_point('imposm==2.5.0', 'console_scripts', 'imposm')()
  File "/usr/lib/python2.7/dist-packages/imposm/app.py", line 257, in main
    db = DB(db_conf)
  File "/usr/lib/python2.7/dist-packages/imposm/db/config.py", line 25, in DB
    return PostGISDB(db_conf)
  File "/usr/lib/python2.7/dist-packages/imposm/db/postgis.py", line 42, in __init__
    if self.is_postgis_2():
  File "/usr/lib/python2.7/dist-packages/imposm/db/postgis.py", line 57, in is_postgis_2
    cur.execute('SELECT postgis_version()')

psycopg2.ProgrammingError: function postgis_version() does not exist
LINE 1: SELECT postgis_version()

Rob Marianski

unread,
Sep 8, 2014, 11:59:49 PM9/8/14
to imp...@googlegroups.com
You need to activate postgis for the database. Try this:

create extension postgis;


--
--
_______________________________________________
Imposm mailing list
imp...@googlegroups.com
http://groups.google.com/group/imposm

---
You received this message because you are subscribed to the Google Groups "imposm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to imposm+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages