<div class="gmail_quote">On Tue, May 4, 2010 at 12:30 AM, Ibrahim Bouchrika <span dir="ltr"><<a href="mailto:ibrahim_bouchrika@hotmail.com">ibrahim_bouchrika@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">




<div>
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 <a href="http://cloudmade.com" target="_blank">cloudmade.com</a>, 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="<a href="http://127.0.0.1:5432" target="_blank">127.0.0.1:5432</a>" 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></div></blockquote><div><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>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>
</div></blockquote></div><br><br>The error message above is stating that you are trying to insert a way twice.  This could be because your database already contains data, or that your data file contains multiple copies of the same way.<br>
<br>Brett<br>