Hi,

I'm trying to load a osm file to my postgresql database.

I'm working on a windows xp system with dual core and 3GB of RAM and about 10GB 
of free space.

I downloaded the netherlands.osm file from cloudmade.com, and extracted 
Amsterdam (which is now slightly bigger than 6MB) using Osmosis' latest version 
0.35 :

C:\osmosis-0.35\bin>osmosis --read-xml file="netherlands.osm" --bb 
left="4.8828" top="52.3927" right="4.9501" bottom="52.3654" 
clipIncompleteEntities=true idTrackerType=BitSet --write-xml amsterdam.osm

This worked without issues.

I then proceeded loading the 0.6 schema and the linestring schema into a 
PostGIS database.
After that I tried using the command line to load the extracted city into this 
database, using next command:

C:\osmosis-0.35\bin>osmosis --read-xml amsterdam.osm --write-pgsql 
host="127.0.0.1:5432" database="Amsterdam" user="postgres" 
password="1kilnmouth"enableLinestringBuilder="yes" 
nodeLocationStoreType="TempFile"

This used to work without issues (Last time I used it was a few months less 
then a year ago, but now it doesn't seem to work anymore, while the only thing 
that changed is the country/city i'm trying to load. I used to use version 
0.31.1, which back then worked, but now doesn't seem to do the trick anymore. 
That's why I switched to the newest release, which doesn't seem to solve the 
problem.

I copied the output below (excuse me for posting the whole printout, but I 
don't know for sure which information is relevant and which is not)

Could anyone tell me how I can get by this problem? 'cause it's really bugging 
me that something which worked before now all of the sudden doesn't cut it.

C:\osmosis-0.35\bin>osmosis --read-xml amsterdam.osm --write-pgsql host="127.0.0
.1:5432" database="Amsterdam" user="postgres" password="**********" enableLinest
ringBuilder="yes" nodeLocationStoreType="TempFile"
3-mei-2010 16:06:51 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.35
3-mei-2010 16:06:52 org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
3-mei-2010 16:06:52 org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
3-mei-2010 16:06:53 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
3-mei-2010 16:17:17 org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskMan
ager waitForCompletion
SEVERE: Thread for task 1-read-xml failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to execute statem
ent.
        at org.openstreetmap.osmosis.core.pgsql.common.DatabaseContext.executeSt
atement(DatabaseContext.java:107)
        at org.openstreetmap.osmosis.core.pgsql.v0_6.PostgreSqlWriter.complete(P
ostgreSqlWriter.java:835)
        at org.openstreetmap.osmosis.core.xml.v0_6.XmlReader.run(XmlReader.java:
110)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.postgresql.util.PSQLException: ERROR: could not create unique ind
ex "pk_ways"
  Detail: Table contains duplicated values.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx
ecutorImpl.java:1592)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
Impl.java:1327)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
va:192)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:451)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract
Jdbc2Statement.java:336)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:328)
        at org.openstreetmap.osmosis.core.pgsql.common.DatabaseContext.executeSt
atement(DatabaseContext.java:104)
        ... 3 more
3-mei-2010 16:17:17 org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed
.
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple
tion(Pipeline.java:146)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:85)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun
cher.java:329)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
                                          
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
_______________________________________________
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to