This attached perl filter "purge.pl" will remove nodes marked a
deleted. you can extend it for ways as well.

usage :
perl purge.pl version2.osm > version21.osm

test :
mdup...@introspector-desktop:~/Desktop$ diff version2.osm version21.osm
2c2
< <osm version='0.6' generator='JOSM'>
---
> <osm version='0.6' generator='h4ck3rm1k3'>
1070d1069
<   <node id='587702957' action='delete'
timestamp='2009-12-12T14:09:26Z' uid='131059' user='h4ck3rm1k3'
visible='true' version='1' lat='36.5967337' lon='-93.5215472' />


mike

On Sun, Dec 13, 2009 at 2:34 PM, jamesmikedup...@googlemail.com
<jamesmikedup...@googlemail.com> wrote:
> On Sun, Dec 13, 2009 at 1:57 PM, Jonas Krückel <o...@jonas-krueckel.de> wrote:
>> Hi,
>>
>> I've loaded a local .osm file into JOSM and deleted some relations. Now I 
>> want to save this file, but without the information about what I have 
>> edited. I don't want to have the action= tags in the .osm file and I also 
>> don't want to have any id's changed etc. How can I save it this way? I'm 
>> going to process the file locally with other tools and therefore don't need 
>> and want this extra information.
>
> If you made the edits in josm then you will get the modified flags.
> you can just strip them out with a little command line magic.
>
> sed -e 's;action='delete';;g'  -e 's;action='modify';;g' test.osm
>
> that will strip out the delete and modify action.s from an osm file.
>
>
> mike
>

Attachment: purge.pl
Description: Perl program

_______________________________________________
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev

Reply via email to