Ignore:
Timestamp:
2020-02-06T01:03:07+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #18654 - Separate unique identifiers per primitive type

This allows to easily update .osm files with negative ids across multiple sessions, such as internal JOSM boundaries file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/WayData.java

    r13922 r15820  
    1414
    1515    private static final long serialVersionUID = 106944939313286415L;
     16    private static final UniqueIdGenerator idGenerator = Way.idGenerator;
    1617    private List<Long> nodes = new ArrayList<>();
    1718
     
    2122    public WayData() {
    2223        // contents can be set later with setters
     24        this(idGenerator.generateUniqueId());
    2325    }
    2426
     
    130132        throw new UnsupportedOperationException();
    131133    }
     134
     135    @Override
     136    public UniqueIdGenerator getIdGenerator() {
     137        return idGenerator;
     138    }
    132139}
Note: See TracChangeset for help on using the changeset viewer.