[OSM-dev] JOSM including new deleted items in the saved OSM file

Etienne 80n80n at gmail.com
Sun Sep 3 15:25:12 BST 2006


It is by design that items that have not yet been added to OSM use negative
ids.  It is also by design that anything deleted will have  an
action="delete" attribute.

The current version of Osmarender does not take account of the
action="delete" attribute and so continues to render the line even though
you think you have deleted it.

I encountered this problem recently and had already developed a patch for
it:

 Change line 169 of Osmarender.xsl to the following:

  <xsl:variable name='allElements'
select='$data/osm/*[not(@action="delete")]' />

That should supress anything that has been deleted from the .osm file, but
is still present because it has not yet been uploaded to the server.

Etienne


On 9/3/06, Dean Earley <dean at earlsoft.co.uk> wrote:
>
> Hi Imi.
>
> (I'm posting to this list to get comments from any others that know java )
>
> When items are added in JOSM, then deleted before an upload, they are
> left in the saved OSM files. Unfortunately, this causes unsightly lines
> from one end to 0,0 when that OSM file is rendered in OSMARender.
>
> I have had a look at the code, and it looks like they should be removed
> in OsmDataLayer.cleanData/cleanIterator but they aren't as they aren't
> ever added to the list to be processed.
>
> Is it just a matter of checking the ID is < 0 in cleanIterator?
>
> Thanks.
>
> --
> Dean Earley, Dee (dean at earlsoft.co.uk)
>
> irc:    irc://irc.blitzed.org/
> web:    http://personal.earlsoft.co.uk
> phone:  +44 (0)780 8369596
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20060903/569a8d3d/attachment.html>


More information about the dev mailing list