<div class="gmail_quote">On Wed, May 19, 2010 at 4:29 AM, Christoph Wagner <span dir="ltr"><<a href="mailto:freemaps.osm@googlemail.com">freemaps.osm@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Am 18.05.2010 15:18, schrieb Brett Henderson:<br>
<div class="im"><br>
> To summarise, if you can draw a graph of the data flows in Osmosis, ensure<br>
> that you never have data being split then recombined at a later point.<br>
><br>
> In your case the only option is to split it into two steps using temporary<br>
> XML files as you already appear to be doing.<br>
><br>
> It would be nice if Osmosis could detect this situation and throw an error,<br>
> but it would take a lot of effort and add a lot of complexity that I don't<br>
> really wish to attempt.<br>
<br>
<br>
<br>
</div>Ok, thanks for your reply. I think now I understand the situation better.<br>
<br>
While reading your answer I got an idea to solve the problem without writing to disk.<br>
<br>
I use a very big buffer now:<br>
<div class="im"><br>
osmosis-0.35.1/bin/osmosis --rx input.osm --t outPipe.1=points \<br>
</div>--wk keyList="addr:interpolation,addr:housenumber" --un --s --b 100000000 \<br>
--nk inPipe.0=points keyList="addr:housenumber" --s --b 100000000 \<br>
--m --wx addr.osm<br>
<br>
This works very well if you have enough RAM and set the bufferCapacity high enough.<br></blockquote><div><br>Yes, that will also work if you're prepared to experiment a bit with buffer sizes.<br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Another possibility would be a better tagfilter that allows me to filter POIs and ways at once.<br>
The task would be for example: "Give me all ways that match this way-filter and all nodes that match this node-filter or are part of the way that matches the way-filter"<br></blockquote><div><br>The --tag-filter task is about the most comprehensive task currently available.  To add a full boolean expression language is certainly possible, but not trivial.  If somebody wants to take on the challenge of creating a complex yet generic tag analysis task then I'll do my best to help them out.  I'll be honest though, it's not likely to be something I'll get around to implementing myself.<br>
<br></div></div>Thinking about your case a bit more, you could avoid the temp file if you simply read the input file twice so you avoid the --tee.  Although that might be slower than creating a temp file and invoking Osmosis twice.  If it was me I'd simply create a wrapper shell script to tie several osmosis commands together and do some checking of the Osmosis return code to ensure it hasn't failed at each step.  The --buffer approach might work, but the memory consumption is likely to bite you at some point.<br>
<br>Brett<br><br>