The polygon file is quite large - around 10MB if I remember correctly.  Most of 
the states are only 100KB or so, so it is much much larger than any of the 
states.

Is there any easy way to edit these polygon files?  They're basically just a 
list of lat and lon values I think, but it'll take forever to edit one of that 
size by hand.

I'll try it without the larger heap size as well, but if I remember correctly 
java was using around 300MB or so of RAM while it was running.  I'll 
double-check it though.

-Jeremy
  ----- Original Message ----- 
  From: Karl Newman 
  To: Jeremy Adams 
  Cc: [email protected] 
  Sent: Monday, January 07, 2008 7:42 PM
  Subject: Re: [OSM-talk] Osmosis and large bounding polygons


  On Jan 7, 2008 3:33 PM, Jeremy Adams <[EMAIL PROTECTED]> 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=" 
usa.osm"

    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?

    -Jeremy


  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. 

  Karl 


------------------------------------------------------------------------------


  No virus found in this incoming message.
  Checked by AVG Free Edition. 
  Version: 7.5.516 / Virus Database: 269.17.13/1213 - Release Date: 1/7/2008 
9:14 AM
_______________________________________________
talk mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk

Reply via email to