[OSM-dev] Osmosis: no --wk?

Frederik Ramm frederik at remote.org
Sun Jan 18 21:07:24 GMT 2009


Hi,

Brett Henderson wrote:
> It's just a "no patch" thing.  The tag processing support in osmosis is 
> currently very basic including whatever I've received as patches.  A 
> more comprehensive and consistent set of tasks would be nice. 

I see. I'll write this up for trac but at the same time put it on my 
list of things to do if I get the time. Meanwhile I think I've found a 
problem even with the existing --wkv. With Osmosis 0.29, I take this 
input document:

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.5" generator="Osmosis 0.29">
   <node id="1" lat="12" lon="13"/>
   <node id="2" lat="12" lon="13"/>
   <way id="3">
     <nd ref="1"/>
     <nd ref="2"/>
     <tag k="key" v="value"/>
   </way>
</osm>

and I run

osmosis --rx test.osm --wkv key.value --wx -

expecting to find my way in the output, but I receive only

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.5" generator="Osmosis 0.29">
   <node id="1" timestamp="" lat="12" lon="13"/>
   <node id="2" timestamp="" lat="12" lon="13"/>
</osm>

... I took a quick look at the source and I can see no obvious fault 
though. What I do see is that the filter mechanism is ill-equipped for 
keys or values that contain a . or , character, something that could be 
fixed in the overhaul when it happens.

While I'm at it, I was totally unable to run --wkv with a value that 
contained a space character even though this is not Osmosis' fault (or, 
more precisely, not the Java program's fault). Running

osmosis --rx test.osm --wkv "key.value with spaces" --wx -

does not work because the shell script strips away the quotation marks 
and Osmosis then sees the unassigned bare words "with" and "spaces". 
Running the full "java --jar..." command line in the same fashion works 
(as expected), but strangely

osmosis --rx test.osm --wkv \"key.value with spaces\" --wx -

did not work (resulting in the same error message as without the 
backshlashes) - can anybody say why?

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"




More information about the dev mailing list