On Jan 7, 2008 3:33 PM, Jeremy Adams <<a href="mailto:milenko@king-nerd.com">milenko@king-nerd.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Does anyone have any experience with osmosis and extracting large polygons? I'm trying to get the united states exported using the files from the maproom. I can extract a single state in about an hour and a half, but getting the whole country takes exponentially longer than that. As of right now, it's been running for about three hours and the output .osm file is only about 300MB and that's uncompressed.
<br><br>By command-line is as follows:<br><br>java -Xmx1024m -jar osmosis.jar --rx EnableDateParsing=no file="/home/jadams/planet-latest.osm" --bp file="bin/polygons/united_states2pts.txt" idTrackerType=BitSet --wx file="
usa.osm"<br><br>I've tried with and without enabledateparsing and idtrackertype and it's not really any faster.<br><br>Is this expected performance, or do I have something wrong somewhere?<br><br>-Jeremy<br></blockquote>
</div><br>How big is your united states polygon file? If it's terribly complex, that could make a huge difference. You might look at it and see if you could simplify large sections, such as draw a box around the Hawaiian Islands instead of tracing each island's outline, or straighten out the coastlines by extending the boundary out to sea and losing the detail points. You could turn the west coast into 2 or 3 points. Save the detail points for the Canada and Mexico borders.
<br><br>One other thing you could try is the "server" mode of your JRE (I think you just pass -server to the command line). I've heard anecdotal reports that it runs 20% faster, but with a slower startup time. Also, you shouldn't need to change the heap size (you could probably lose the -Xmx1024m). Osmosis is geared to run as a streaming pipeline to minimize memory usage, regardless of the data size. The BitSet idTracker is the right one to use, I think, and EnableDateParsing=no is probably the way to go if you don't need it.
<br><br>Karl