Changeset 35446 in osm for applications


Ignore:
Timestamp:
2020-05-14T15:22:01+02:00 (4 years ago)
Author:
gerdp
Message:

fix #josm19165: pbf plugin removes empty relations when saving to file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java

    r34098 r35446  
    486486            processor.processSources(ds.getDataSources());
    487487            Comparator<OsmPrimitive> cmp = Comparator.comparingLong(OsmPrimitive::getUniqueId);
    488             ds.getNodes().stream().sorted(cmp).filter(n -> n.isLatLonKnown()).forEach(processor::processNode);
    489             ds.getWays().stream().sorted(cmp).filter(w -> w.getNodesCount() > 0).forEach(processor::processWay);
    490             ds.getRelations().stream().sorted(cmp).filter(r -> r.getMembersCount() > 0).forEach(processor::processRelation);
     488            ds.getNodes().stream().sorted(cmp).filter(Node::isUsable).forEach(processor::processNode);
     489            ds.getWays().stream().sorted(cmp).filter(Way::isUsable).forEach(processor::processWay);
     490            ds.getRelations().stream().sorted(cmp).filter(Relation::isUsable).forEach(processor::processRelation);
    491491        }
    492492
Note: See TracChangeset for help on using the changeset viewer.