omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
726 stars 159 forks source link

--table-prefix support #27

Closed heffergm closed 10 years ago

heffergm commented 10 years ago

Hi, Would love to have an equivalent functionality to imposm2 for support of --table-prefix.

olt commented 10 years ago

Try -connect postgis://localhost/db?prefix=my_prefix_.

heffergm commented 10 years ago

I get a 'bad connection' error from the driver, but I am using the January binary release...

olt commented 10 years ago

Can you post your connection string (before and after)?

heffergm commented 10 years ago

Basically identical to a sample from the readme, using this build (http://imposm.org/static/rel/imposm3-0.1dev-20140624-cf8c196-linux-x86-64.tar.gz):

before:

imposm3 import -connection postgis://user:password@host/database -mapping mapping.json -read /path/to/osm.pbf -write

after:

imposm3 import -connection postgis://user:password@host/database?prefix=someprefix -mapping mapping.json -read /path/to/osm.pbf -write

olt commented 10 years ago

Ok, I think lib/pq does not allow unknown parameters in the connection string anymore. Should work now!

heffergm commented 10 years ago

Awesome, thx!

heffergm commented 10 years ago

Were you expecting this build to contain the fix? http://imposm.org/static/rel/imposm3-0.1dev-20140624-cf8c196-linux-x86-64.tar.gz

Getting the same error.

root@extractor2:/tmp/imposm3-0.1dev-20140624-cf8c196-linux-x86-64# ./imposm3 import -connection postgis://user:password@localhost/osm?prefix=a_prefix_ -mapping mapping.json -read abuja.osm.pbf -overwritecache -write
[Jun 25 15:09:07] driver: bad connection