<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-Jeremy</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=siliconfiend@gmail.com href="mailto:siliconfiend@gmail.com">Karl 
  Newman</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=milenko@king-nerd.com 
  href="mailto:milenko@king-nerd.com">Jeremy Adams</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=talk@openstreetmap.org 
  href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 07, 2008 7:42 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [OSM-talk] Osmosis and large 
  bounding polygons</DIV>
  <DIV><BR></DIV>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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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 
  <P>
  <HR>

  <P></P>No virus found in this incoming message.<BR>Checked by AVG Free 
  Edition. <BR>Version: 7.5.516 / Virus Database: 269.17.13/1213 - Release Date: 
  1/7/2008 9:14 AM<BR></BLOCKQUOTE></BODY></HTML>