HistoryOsmPrimitive primitive = null;
if (type.equals(OsmPrimitiveType.NODE)) {
Double lat = getAttributeDouble(atts, "lat");
Double lon = getAttributeDouble(atts, "lon");
LatLon coor = (lat != null && lon != null) ? new LatLon(lat,lon) : null;
primitive = new HistoryNode(
id,version,visible,user,changesetId,timestamp,coor
);
} else if (type.equals(OsmPrimitiveType.WAY)) {
primitive = new HistoryWay(