<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi,<br><br>I'm trying to load a osm file to my postgresql database.<br><br>I'm working on a windows xp system with dual core and 3GB of RAM and about 10GB of free space.<br><br>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 :<br><br>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<br><br>This worked without issues.<br><br>I then proceeded loading the 0.6 schema and the linestring schema into a PostGIS database.<br>After that I tried using the command line to load the extracted city into this database, using next command:<br><br>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"<br><br>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.<br><br>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)<br><br>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.<br><br>C:\osmosis-0.35\bin>osmosis --read-xml amsterdam.osm --write-pgsql host="127.0.0<br>.1:5432" database="Amsterdam" user="postgres" password="**********" enableLinest<br>ringBuilder="yes" nodeLocationStoreType="TempFile"<br>3-mei-2010 16:06:51 org.openstreetmap.osmosis.core.Osmosis run<br>INFO: Osmosis Version 0.35<br>3-mei-2010 16:06:52 org.openstreetmap.osmosis.core.Osmosis run<br>INFO: Preparing pipeline.<br>3-mei-2010 16:06:52 org.openstreetmap.osmosis.core.Osmosis run<br>INFO: Launching pipeline execution.<br>3-mei-2010 16:06:53 org.openstreetmap.osmosis.core.Osmosis run<br>INFO: Pipeline executing, waiting for completion.<br>3-mei-2010 16:17:17 org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskMan<br>ager waitForCompletion<br>SEVERE: Thread for task 1-read-xml failed<br>org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to execute statem<br>ent.<br>        at org.openstreetmap.osmosis.core.pgsql.common.DatabaseContext.executeSt<br>atement(DatabaseContext.java:107)<br>        at org.openstreetmap.osmosis.core.pgsql.v0_6.PostgreSqlWriter.complete(P<br>ostgreSqlWriter.java:835)<br>        at org.openstreetmap.osmosis.core.xml.v0_6.XmlReader.run(XmlReader.java:<br>110)<br>        at java.lang.Thread.run(Thread.java:619)<br>Caused by: org.postgresql.util.PSQLException: ERROR: could not create unique ind<br>ex "pk_ways"<br>  Detail: Table contains duplicated values.<br>        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx<br>ecutorImpl.java:1592)<br>        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor<br>Impl.java:1327)<br>        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja<br>va:192)<br>        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat<br>ement.java:451)<br>        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract<br>Jdbc2Statement.java:336)<br>        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat<br>ement.java:328)<br>        at org.openstreetmap.osmosis.core.pgsql.common.DatabaseContext.executeSt<br>atement(DatabaseContext.java:104)<br>        ... 3 more<br>3-mei-2010 16:17:17 org.openstreetmap.osmosis.core.Osmosis main<br>SEVERE: Execution aborted.<br>org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed<br>.<br>        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple<br>tion(Pipeline.java:146)<br>        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:85)<br>        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)<br>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.<br>java:39)<br>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces<br>sorImpl.java:25)<br>        at java.lang.reflect.Method.invoke(Method.java:597)<br>        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun<br>cher.java:329)<br>        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav<br>a:239)<br>        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La<br>uncher.java:409)<br>        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:<br>352)<br>        at org.codehaus.classworlds.Launcher.main(Launcher.java:31)<br>                                        <br /><hr />Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. <a href='http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1' target='_new'>Learn more.</a></body>
</html>