[OSM-talk] Osmosis and large bounding polygons
siliconfiend at gmail.com
Tue Jan 8 00:42:58 GMT 2008
On Jan 7, 2008 3:33 PM, Jeremy Adams <milenko at king-nerd.com> wrote:
> 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.
> By command-line is as follows:
> 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="
> I've tried with and without enabledateparsing and idtrackertype and it's
> not really any faster.
> Is this expected performance, or do I have something wrong somewhere?
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.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk